@Test
  public void testInvalidSchedule() {
    String someSchedule = "X Y * * * *";
    Properties props = new Properties();
    props.put(AutoBalancer.SCHEDULE, someSchedule);

    AutoBalancer autoR = new AutoBalancer();
    assertThatThrownBy(() -> autoR.initialize(null, props))
        .isInstanceOf(GemFireConfigException.class);
  }
UnitTests for AutoBalancer. All collaborators should be mocked.
geode-rebalancer/src/test/java/org/apache/geode/cache/util/AutoBalancerJUnitTest.java