@Test
public void decodePutCommandUnCompleteData() {
IoBuffer buf = IoBuffer.wrap("put test 1 5 0 10\r\nhel".getBytes());
PutCommand decodedCmd = (PutCommand) this.decoder.decode(buf, null);
assertNull(decodedCmd);
assertEquals(0, buf.position());
assertEquals(buf.capacity(), buf.remaining());
buf = IoBuffer.wrap("put test 1 5 0 10\r\nhello".getBytes());
decodedCmd = (PutCommand) this.decoder.decode(buf, null);
assertNotNull(decodedCmd);
assertEquals("test", decodedCmd.getTopic());
assertEquals(1, decodedCmd.getPartition());
assertEquals(0, decodedCmd.getFlag());
assertEquals(10, (int) decodedCmd.getOpaque());
assertEquals("hello", new String(decodedCmd.getData()));
assertFalse(buf.hasRemaining());
}