@Test
  public void testGetNodes() throws Exception {
    VM validatorVM = vm2;

    validatorVM.invoke(this::createPRAndTestGetAllNodes);

    validatorVM.invoke(() -> {
      PartitionedRegion partitionedRegion = (PartitionedRegion) getCache().getRegion(regionName);
      Set<InternalDistributedMember> allNodes = partitionedRegion.getAllNodes();
      assertThat(allNodes).isNotNull().hasSize(1);
    });

    vm0.invoke(this::createPRAndTestGetAllNodes);

    validatorVM.invoke(() -> {
      PartitionedRegion partitionedRegion = (PartitionedRegion) getCache().getRegion(regionName);
      Set<InternalDistributedMember> allNodes = partitionedRegion.getAllNodes();
      assertThat(allNodes).isNotNull().hasSize(2);
    });

    vm1.invoke(this::createPRAndTestGetAllNodes);

    validatorVM.invoke(() -> {
      PartitionedRegion partitionedRegion = (PartitionedRegion) getCache().getRegion(regionName);
      Set<InternalDistributedMember> allNodes = partitionedRegion.getAllNodes();
      assertThat(allNodes).isNotNull().hasSize(3);
    });
  }
Test the {@link PartitionedRegionGetSomeKeys#getSomeKeys(PartitionedRegion, Random)} method,
making sure it returns keys when there are keys and {@link java.util.Collections#EMPTY_SET}
when there are none.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionTestUtilsDUnitTest.java