public void testBeginXAEndPrepareCommit() throws Exception {
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.COMMIT_TWO_PHASE),