@SuppressWarnings("deprecation")
  public static int createServerCache() throws Exception {
    Properties props = new Properties();
    TxCommitMessageBCTestBase test =
        new TxCommitMessageBCTestBase() {};
    DistributedSystem ds = test.getSystem(props);
    ds.disconnect();
    cache = (GemFireCacheImpl) CacheFactory.create(test.getSystem());

    RegionFactory<String, String> rf1 = cache.createRegionFactory(RegionShortcut.REPLICATE);
    rf1.create(REPLICATE_REGION_NAME);

    PartitionAttributesFactory<String, Integer> paf2 = new PartitionAttributesFactory<>();
    PartitionAttributes<String, Integer> pa2 =
        paf2.setRedundantCopies(1).setPartitionResolver(new PartitionResolver<String, Integer>() {
          @Override
          public Object getRoutingObject(EntryOperation<String, Integer> opDetails) {
            return opDetails.getKey().substring(0, 3);
          }

          @Override
          public String getName() {
            return getClass().getSimpleName();
          }

          @Override
          public void close() {}
        }).create();
    RegionFactory<String, String> rf2 =
        cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT);
    rf2.setPartitionAttributes(pa2);
    rf2.create(PARTITION_REGION_NAME);

    CacheServer server = cache.addCacheServer();
    server.setPort(getRandomAvailableTCPPort());
    server.start();
    return server.getPort();
  }
This test class tests the communication pattern of a transaction for replicate and partition
region. There are five VMs that two CacheServers, CacheServer with Pool and two clients. The
communicate of a transaction is the following three patterns. In addition, this test class also
tests transactions from older version clients to check backwards compatibility.<br>
<ol>
<li>CacheServer (transaction)-> CacheServer</li>
<li>Client (transaction)-> CacheServer</li>
<li>Old version client (transaction)-> CacheServer</li>
<li>CacheServer via Pool (transaction)-> CacheServer</li>
</ol>
geode-core/src/upgradeTest/java/org/apache/geode/internal/cache/TxCommitMessageBCTestBase.java