@Test
public void testLocalBeginRollback() throws Exception {
final String serverUrl = "meta://localhost:8123";
this.mockIsConnected(serverUrl, true);
this.context.setServerUrl(serverUrl);
final TransactionId id = new LocalTransactionId(this.sessionId, 1);
this.mockInvokeSuccess(serverUrl, new TransactionInfo(id, this.sessionId, TransactionType.BEGIN), null);
this.mockInvokeSuccess(serverUrl, new TransactionInfo(id, this.sessionId, TransactionType.ROLLBACK), null);
assertNull(this.context.getTransactionId());
assertFalse(this.context.isInTransaction());
OpaqueGenerator.resetOpaque();
this.replay();
this.context.begin();
final TransactionId xid = this.context.getTransactionId();
assertNotNull(xid);
assertTrue(xid.isLocalTransaction());
assertTrue(this.context.isInLocalTransaction());
assertFalse(this.context.isInXATransaction());
assertTrue(this.context.isInTransaction());
this.context.rollback();