@Test
public void testMultipleInputYieldsWatermarkOnlyWhenAllChannelsReceivesWatermarks() {

	BufferedValveOutputHandler valveOutput = new BufferedValveOutputHandler();
	StatusWatermarkValve valve = new StatusWatermarkValve(3, valveOutput);
	valve.inputWatermark(new Watermark(0), 0);
	valve.inputWatermark(new Watermark(0), 1);
	assertEquals(null, valveOutput.popLastSeenOutput());
	// now, all channels have watermarks
	valve.inputWatermark(new Watermark(0), 2);
	assertEquals(new Watermark(0), valveOutput.popLastSeenOutput());
	assertEquals(null, valveOutput.popLastSeenOutput());
}