@Test
  public void testParentRegionGetWithOfflineChildRegion() {
    // Expect a get() on the un-recovered (due to offline child) parent region to fail
    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> {
        createCache();
        createDiskStore(diskStoreName1);
        createPR_withPersistence(regionName, diskStoreName1, 0, DEFAULT_REDUNDANT_COPIES,
            DEFAULT_STARTUP_RECOVERY_DELAY);
      });
    }

    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(
          () -> createChildPR_withPersistence(regionName, childRegionName1, diskStoreName1, 0,
              DEFAULT_REDUNDANT_COPIES,
              DEFAULT_STARTUP_RECOVERY_DELAY));
    }

    // Create some buckets.
    vm0.invoke(() -> {
      createData(regionName, "a");
      createData(childRegionName1, "a");
    });

    // Close the members
    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(this::closeCache);
    }

    // Recreate the parent region. Try to make sure that the member with the latest copy of the
    // buckets is the one that decides to throw away it's copy by starting it last.
    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> {
        createCache();
        createDiskStore(diskStoreName1);
        createPR_withPersistence(regionName, diskStoreName1, 0, DEFAULT_REDUNDANT_COPIES,
            DEFAULT_STARTUP_RECOVERY_DELAY);
      });
    }

    // Now create the parent region on vm-2. vm-2 did not previously host the child region.
    vm2.invoke(() -> {
      createCache();
      createDiskStore(diskStoreName1);
      createPR_withPersistence(regionName, diskStoreName1, 0, DEFAULT_REDUNDANT_COPIES,
          DEFAULT_STARTUP_RECOVERY_DELAY);
    });

    vm0.invoke(() -> {
      Region<Integer, String> region = getCache().getRegion(regionName);
      Throwable thrown = catchThrowable(() -> region.get(0));
      assertThat(thrown).isInstanceOf(PartitionOfflineException.class);
    });
  }
Test that a rebalance will regions are in the middle of recovery doesn't cause issues.

This is slightly different than {@link #testRebalanceWithOfflineChildRegion(String)} because
in this case all of the regions have been created, but they are in the middle of actually
recovering buckets from disk.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDistributedTest.java