Assert.assertFalse(outs.hasNext());
}
@Test
public void iteratorSkipsClosedPorts() {
InputPorts ports = mock(InputPorts.class);
InputPort port1 = mock(InputPort.class, "port #1");
InputPort port2 = mock(InputPort.class, "port #2");
InputPort port3 = mock(InputPort.class, "port #3");
when(ports.size()).thenReturn(3);
when(ports.port(0)).thenReturn(port1);
when(ports.port(1)).thenReturn(port2);
when(ports.port(2)).thenReturn(port3);
when(port1.isClosed()).thenReturn(false);
when(port2.isClosed()).thenReturn(true);
when(port3.isClosed()).thenReturn(false);