@Test
  public void canCreateTwoPeerCachesWithReplicatedRegion() {
    Cache cache1 = createCache("cache1");
    Cache cache2 = createCache("cache2");

    Region<String, String> region1 =
        cache1.<String, String>createRegionFactory(REPLICATE).create("region");
    Region<String, String> region2 =
        cache2.<String, String>createRegionFactory(REPLICATE).create("region");

    assertThat(region2).isNotSameAs(region1);

    String value = "value";
    region1.put("key", value);

    String region2Value = region2.get("key");
    assertThat(value).isEqualTo(region2Value);

    // Make sure the value was actually serialized/deserialized between the two caches
    assertThat(value).isNotSameAs(region2Value);
  }
Test that we can create multiple caches in the same JVM
geode-core/src/integrationTest/java/org/apache/geode/pdx/internal/MultipleCacheJUnitTest.java