@Test(expected = UnsupportedOperationException.class) public void testTryWrite() { ByteBuf byteBuf = new UnpooledByteBufAllocator(false).buffer(); byteBuf.setBytes(0, "+OK\r\n".getBytes()); try { sessionClosed.tryWrite(byteBuf); } catch (Exception e) { throw e; } finally { ReferenceCountUtil.release(byteBuf); } }
@Override public void tryWrite(ByteBuf byteBuf) { throw new UnsupportedOperationException("Session's been closed"); }
SessionClosed extends AbstractSessionState { @Override public void tryWrite(ByteBuf byteBuf) { throw new UnsupportedOperationException("Session's been closed"); } }
SessionClosed extends AbstractSessionState { @Override public void tryWrite(ByteBuf byteBuf) { throw new UnsupportedOperationException("Session's been closed"); } SessionClosed(Session session); }
SessionClosed extends AbstractSessionState { @Override public void tryWrite(ByteBuf byteBuf) { throw new UnsupportedOperationException("Session's been closed"); } SessionClosed(Session session); @Override void tryWrite(ByteBuf byteBuf); @Override String name(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
SessionClosed extends AbstractSessionState { @Override public void tryWrite(ByteBuf byteBuf) { throw new UnsupportedOperationException("Session's been closed"); } SessionClosed(Session session); @Override void tryWrite(ByteBuf byteBuf); @Override String name(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }