@Test
  public void testFacadeCollectMemberDetailsNoRegion() {
    final GemFireCacheImpl mockCache = mock(GemFireCacheImpl.class);
    when(mockCache.isClosed()).thenReturn(false);
    when(mockCache.getPartitionedRegions()).thenReturn(Collections.emptySet());
    GeodeCacheFacade facade = new GeodeCacheFacade(mockCache);

    assertThat(facade.getRegionMemberDetails().size()).isEqualTo(0);
  }
UnitTests for AutoBalancer. All collaborators should be mocked.
geode-rebalancer/src/test/java/org/apache/geode/cache/util/AutoBalancerJUnitTest.java