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