### Question:
PacketArrivalEvent extends Event { @Override public String toString() { return "PacketArrivalEvent<" + arrivalNetworkDevice.getIdentifier() + ", " + this.getTime() + ", " + this.packet + ">"; } PacketArrivalEvent(long timeFromNowNs, Packet packet, NetworkDevice arrivalNetworkDevice); @Override void trigger(); @Override String toString();  }### Answer:
@Test public void testToString() { NetworkDevice networkDevice = mock(NetworkDevice.class); PacketArrivalEvent event = new PacketArrivalEvent(999, packet, networkDevice); event.toString(); }