SessionEstablished extends AbstractSessionState { @Override public void tryWrite(ByteBuf byteBuf) { ((AbstractSession)session).doWrite(byteBuf); } SessionEstablished(Session session); @Override void tryWrite(ByteBuf byteBuf); @Override String name(); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean isValidNext(SessionState sessionState); @Override String toString();  }
@Test @DirtiesContext public void testTryWrite() { sessionEstablished.tryWrite(new UnpooledByteBufAllocator(true).buffer()); }