@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); }
protected void onPacket(Packet<?> packet) { emit("packet", packet); }
Transport extends Emitter { protected void onPacket(Packet<?> packet) { emit("packet", packet); } }
Transport extends Emitter { protected void onPacket(Packet<?> packet) { emit("packet", packet); } protected  Transport(); }
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(); }
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();  }