@Test
  public void testExampleWithSubRegion() {
    cacheXmlFileName = CACHE_XML_FILE_2;

    vm0.invoke(() -> createCache(cacheXmlFileName));
    vm1.invoke(() -> createCache(cacheXmlFileName));

    vm0.invoke(() -> {
      Region<String, String> region = getCache().getRegion(PARTITIONED_SUBREGION_NAME);
      assertThat(region).isInstanceOf(PartitionedRegion.class);
      assertThat(PartitionedRegionHelper.isSubRegion(region.getFullPath())).isTrue();

      Object value = region.get("1");
      assertThat(value).as("CacheLoader is not invoked").isNotNull();

      region.put("key1", "value1");
      value = region.get("key1");

      assertThat(value).isEqualTo("value1");
    });
  }
This class tests regions created by xml files
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java