LengthPrefixedCodec implements ProtocolCodec { protected boolean empty() { if (next_write_size > 0) { return false; } if (!next_write_buffers.isEmpty()) { for (ByteBuffer b : next_write_buffers) { if (b.remaining() > 0) { return false; } } } return true; }  boolean full(); void setWritableByteChannel(WritableByteChannel channel); BufferState write(Object value); BufferState flush(); long getWriteCounter(); void setReadableByteChannel(ReadableByteChannel channel); Object read(); long getReadCounter();  }
@Test public void testEmpty() throws Exception { assertEquals(true, codec.empty()); }