BenchmarkUtils { public static boolean ifAckEnabled(Config config) { Object ackers = config.get(Config.TOPOLOGY_ACKER_EXECUTORS); if (null == ackers) { LOG.warn("acker executors are null"); return false; } return Utils.getInt(ackers) > 0; } private  BenchmarkUtils(); static double max(Iterable<Double> iterable); static double avg(Iterable<Double> iterable); static void putIfAbsent(Map map, Object key, Object val); static int getInt(Map map, Object key, int def); static boolean ifAckEnabled(Config config);  }
@Test(dataProvider = "getNumberOfAckers") public void ifAckEnabledShouldReturnTrueForOneOrMoreAckers(int ackers, boolean expected) { Config config = new Config(); assertThat(BenchmarkUtils.ifAckEnabled(config)).isFalse(); config.put(Config.TOPOLOGY_ACKER_EXECUTORS, ackers); assertThat(BenchmarkUtils.ifAckEnabled(config)).isEqualTo(expected); }