final String serverUrl = "meta://localhost:8123";
this.mockIsConnected(serverUrl, true);
this.context.setServerUrl(serverUrl);
final XATransactionId id = XIDGenerator.createXID(1);
this.mockInvokeSuccess(serverUrl, new TransactionInfo(id, this.sessionId, TransactionType.BEGIN), null);
this.mockSend(serverUrl, new TransactionInfo(id, this.sessionId, TransactionType.END));
this.mockInvokeSuccess(serverUrl, new TransactionInfo(id, this.sessionId, TransactionType.PREPARE),
String.valueOf(XAResource.XA_OK));
this.mockInvokeSuccess(serverUrl, new TransactionInfo(id, this.sessionId, TransactionType.ROLLBACK), null);
OpaqueGenerator.resetOpaque();
this.replay();
this.context.start(id, XAResource.TMNOFLAGS);
assertFalse(this.session.removeCtx);