@Test
  public void testAutoRebalaceStatsOnLockSuccess() throws InterruptedException {
    assertEquals(0, cache.getInternalResourceManager().getStats().getAutoRebalanceAttempts());
    AutoBalancer balancer = new AutoBalancer();
    final String someSchedule = "1 * * * 1 *";
    final Properties props = new Properties();
    props.put(AutoBalancer.SCHEDULE, someSchedule);
    balancer.initialize(cache, props);
    balancer.getOOBAuditor().execute();
    assertEquals(1, cache.getInternalResourceManager().getStats().getAutoRebalanceAttempts());
  }
IntegrationTests for AutoBalancer that include usage of Cache, StatSampler and
DistributedLockService.
geode-rebalancer/src/integrationTest/java/org/apache/geode/cache/util/AutoBalancerIntegrationJUnitTest.java