@Test
public void testBeginTransactionCommit() throws Exception {
this.producer.beginTransaction();
final String serverUrl = "meta://localhost:8123";
this.mockIsConnected(serverUrl, true);
this.mockInvokeSuccess(serverUrl, new TransactionInfo(new LocalTransactionId(this.sessionId, 1),
this.sessionId, TransactionType.BEGIN), null);
this.mockInvokeSuccess(serverUrl, new TransactionInfo(new LocalTransactionId(this.sessionId, 1),
this.sessionId, TransactionType.COMMIT_ONE_PHASE), null);
this.mocksControl.replay();
OpaqueGenerator.resetOpaque();
this.producer.beforeSendMessageFirstTime(serverUrl);
assertTrue(this.producer.isInTransaction());