public class TransactionCommandUnitTest {
@Test
public void testEncode() {
final TransactionId id = new LocalTransactionId("sessionId", 99);
final TransactionInfo info = new TransactionInfo(id, "sessionId", TransactionType.COMMIT_ONE_PHASE, null);
final TransactionCommand cmd = new TransactionCommand(info, 100);
final IoBuffer buf = cmd.encode();
assertEquals("transaction TX:sessionId:99 sessionId COMMIT_ONE_PHASE 100\r\n", new String(buf.array()));