public class PutCommandUnitTest {
@Test
public void testEncode_HasTransactionId() {
final TransactionId id = new LocalTransactionId("test", 1);
final PutCommand putCommand = new PutCommand("test", 1, "hello".getBytes(), id, 0, 0);
final IoBuffer buf = putCommand.encode();
assertEquals(0, buf.position());
assertEquals("put test 1 5 0 -1 TX:test:1 0\r\nhello", new String(buf.array()));
}