### Question:
PacketDispatchedEvent extends Event { @Override public String toString() { return "PacketDispatchedEvent<" + dispatchPort.getOwnId() + " -> " + dispatchPort.getTargetId() + ", " + this.getTime() + ", " + this.packet + ">"; } PacketDispatchedEvent(long timeFromNowNs, Packet packet, OutputPort dispatchPort); @Override void trigger(); @Override String toString();  }### Answer:
@Test public void testToString() { OutputPort port = mock(OutputPort.class); PacketDispatchedEvent event = new PacketDispatchedEvent(999, packet, port); event.toString(); }