@Test
  public void testIncompatibleSubregions() throws CacheException {

    // Scope.GLOBAL is illegal if there is any other cache in the
    // distributed system that has the same region with
    // Scope.DISTRIBUTED_ACK.

    final String name = getUniqueName() + "-ACK";
    vm0.invoke("Create ACK Region", () -> {
      createRegion(name, "INCOMPATIBLE_ROOT", getRegionAttributes());
    });

    vm1.invoke("Create GLOBAL Region", () -> {
      RegionFactory<Object, Object> factory = getCache().createRegionFactory(getRegionAttributes());
      factory.setScope(Scope.GLOBAL);
      try {
        createRegion(name, "INCOMPATIBLE_ROOT", factory);
        fail("Should have thrown an IllegalStateException");
      } catch (IllegalStateException ex) {
        // pass...
      }
    });

    vm1.invoke("Create NOACK Region", () -> {
      RegionFactory<Object, Object> factory = getCache().createRegionFactory(getRegionAttributes());
      factory.setScope(Scope.DISTRIBUTED_NO_ACK);
      try {
        createRegion(name, "INCOMPATIBLE_ROOT", factory);
        fail("Should have thrown an IllegalStateException");
      } catch (IllegalStateException ex) {
        // pass...
      }
    });
  }
Tests the compatibility of creating certain kinds of subregions of a local region.

@see Region#create
geode-core/src/distributedTest/java/org/apache/geode/cache30/DistributedAckRegionDUnitTest.java