@Test
  public void testWithSubRegionDistributedRegionFirst() {
    vm0.invoke(() -> givenDistributedRegion(parentRegionName));
    vm1.invoke(() -> givenDistributedRegion(parentRegionName));
    vm2.invoke(() -> givenDistributedRegion(parentRegionName));
    vm3.invoke(() -> givenDistributedRegion(parentRegionName));

    vm0.invoke(() -> givenDistributedSubRegion(parentRegionName, childRegionName));

    vm1.invoke(() -> validateCreatePartitionedSubRegionThrows(parentRegionName, childRegionName,
        IllegalStateException.class));
    vm2.invoke(() -> validateCreatePartitionedSubRegionThrows(parentRegionName, childRegionName,
        IllegalStateException.class));
    vm3.invoke(() -> validateCreatePartitionedSubRegionThrows(parentRegionName, childRegionName,
        IllegalStateException.class));
  }
Verifies creation of partitioned region and distributed region with same name.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionWithSameNameDUnitTest.java