@Test
  public void testLockStatExecuteInSequence() {
    when(mockCacheFacade.acquireAutoBalanceLock()).thenReturn(true);
    when(mockCacheFacade.getTotalTransferSize()).thenReturn(0L);

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