@Test public void testTriggerIsolated() { OutputPort port = mock(OutputPort.class); PacketDispatchedEvent event = new PacketDispatchedEvent(1000, packet, port); event.trigger(); verify(port, times(1)).dispatch(packet); }
@Override public void trigger() { dispatchPort.dispatch(packet); }
PacketDispatchedEvent extends Event { @Override public void trigger() { dispatchPort.dispatch(packet); } }
PacketDispatchedEvent extends Event { @Override public void trigger() { dispatchPort.dispatch(packet); } PacketDispatchedEvent(long timeFromNowNs, Packet packet, OutputPort dispatchPort); }
PacketDispatchedEvent extends Event { @Override public void trigger() { dispatchPort.dispatch(packet); } PacketDispatchedEvent(long timeFromNowNs, Packet packet, OutputPort dispatchPort); @Override void trigger(); @Override String toString(); }
PacketDispatchedEvent extends Event { @Override public void trigger() { dispatchPort.dispatch(packet); } PacketDispatchedEvent(long timeFromNowNs, Packet packet, OutputPort dispatchPort); @Override void trigger(); @Override String toString();  }