private void doBasicChecks(final boolean commit) {
    Host host = Host.getHost(0);
    VM server = host.getVM(0);
    VM client = host.getVM(1);
    int port1 = createRegionsAndStartServer(server, false);
    createClientRegionAndPopulateData(client, port1, false);

    final TXId txId = (TXId) client.invoke(new DoOpsInTX(OP.PUT));

    server.invoke(new SerializableCallable("verify tx") {
      @Override
      public Object call() {
        TXManagerImpl mgr = getGemfireCache().getTxManager();
        assertTrue(mgr.isHostedTxInProgress(txId));
        return null;
      }
    });

    client.invoke(new SerializableCallable<Object>() {
      @Override
      public Object call() {
        TXManagerImpl mgr = getGemfireCache().getTxManager();
        mgr.resume(txId);
        TXStateProxy tx = mgr.pauseTransaction();
        assertNotNull(tx);
        mgr.unpauseTransaction(tx);
        if (commit) {
          mgr.commit();
        } else {
          mgr.rollback();
        }
        return null;
      }
    });

    server.invoke(new SerializableCallable<Object>() {
      @Override
      public Object call() {
        final TXManagerImpl mgr = getGemfireCache().getTxManager();
        GeodeAwaitility.await().untilAsserted(() -> assertThat(mgr.isHostedTxInProgress(txId))
            .as("waiting for hosted tx in progress to terminate").isFalse());
        return null;
      }
    });
    if (commit) {
      client.invoke(new SerializableCallable<Object>() {
        @Override
        public Object call() {
          verifyAfterCommit(OP.PUT);
          System.out.println("expected verification to fail for this VM");
          return null;
        }
      });
    } else {
      client.invoke(new SerializableCallable<Object>() {
        @Override
        public Object call() {
          verifyAfterRollback(OP.PUT);
          return null;
        }
      });
    }
  }
Tests the basic client-server transaction functionality
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java