MapOutput<Text, Text> out1 = mgr.reserve(null, OUTPUT_SIZE, 0); Assert.assertTrue("Should be a memory merge", (out1 instanceof InMemoryMapOutput)); InMemoryMapOutput<Text, Text> mout1 = (InMemoryMapOutput<Text, Text>)out1; fillOutput(mout1); MapOutput<Text, Text> out2 = mgr.reserve(null, OUTPUT_SIZE, 0); Assert.assertTrue("Should be a memory merge", (out2 instanceof InMemoryMapOutput)); MapOutput<Text, Text> out3 = mgr.reserve(null, OUTPUT_SIZE, 0); Assert.assertEquals("Should be told to wait", null, out3); out1 = mgr.reserve(null, OUTPUT_SIZE, 0); Assert.assertTrue("Should be a memory merge", (out1 instanceof InMemoryMapOutput)); mout1 = (InMemoryMapOutput<Text, Text>)out1; fillOutput(mout1); out2 = mgr.reserve(null, OUTPUT_SIZE, 0); Assert.assertTrue("Should be a memory merge", (out2 instanceof InMemoryMapOutput)); out3 = mgr.reserve(null, OUTPUT_SIZE, 0); Assert.assertEquals("Should be told to wait", null, out3);