@Test
  public void testFailExecuteIfLockedElsewhere() {
    when(mockCacheFacade.acquireAutoBalanceLock()).thenReturn(false);

    AutoBalancer balancer = new AutoBalancer(null, null, null, mockCacheFacade);
    balancer.getOOBAuditor().execute();
    verify(mockCacheFacade, times(1)).acquireAutoBalanceLock();
  }
UnitTests for AutoBalancer. All collaborators should be mocked.
geode-rebalancer/src/test/java/org/apache/geode/cache/util/AutoBalancerJUnitTest.java