### Question:
Transport extends Emitter { protected void onPacket(Packet<?> packet) { emit("packet", packet); } protected  Transport(); abstract void onRequest(HttpServletRequest request, HttpServletResponse response); abstract void send(List<Packet<?>> packets); abstract boolean isWritable(); abstract String getName(); void close();  }### Answer:
@Test public void testOnPacket() { final TestTransport transport = Mockito.spy(new TestTransport()); final Packet<?> testPacket = new Packet<>(Packet.MESSAGE, "test"); transport.onPacket(testPacket); Mockito.verify(transport, Mockito.times(1)).emit("packet", testPacket); }