BatchTimeoutHelper { public int getRecommendedTickInterval() { if (!initialized) {this.init();} if (cliTickTupleFreqSecs > 0 && cliTickTupleFreqSecs > recommendedTickIntervalSecs) { LOG.warn("Parameter '" + Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS + "' has been forced to value '" + Integer.toString(cliTickTupleFreqSecs) + "' via CLI configuration. This will override the desired " + "setting of '" + Integer.toString(recommendedTickIntervalSecs) + "' and may lead to delayed batch flushing."); } if (cliTickTupleFreqSecs > 0 && cliTickTupleFreqSecs < recommendedTickIntervalSecs) { LOG.info("Parameter '" + Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS + "' has been forced to value '" + Integer.toString(cliTickTupleFreqSecs) + "' via CLI configuration. This will override the desired " + "setting of '" + Integer.toString(recommendedTickIntervalSecs) + "' and may lead to unexpected periodicity in batch flushing."); } return recommendedTickIntervalSecs; } BatchTimeoutHelper( Supplier<List<Integer>> listAllConfiguredTimeouts
          , int batchTimeoutDivisor
          ); int getMaxBatchTimeout(); int getRecommendedTickInterval();  }
@Test public void testGetRecommendedTickInterval() throws Exception { BatchTimeoutHelper bth; bth = new BatchTimeoutHelper(defaultConfigList, 2); assertEquals(6, bth.getRecommendedTickInterval()); bth = new BatchTimeoutHelper(disabledConfigList, 2); assertEquals(6, bth.getRecommendedTickInterval()); bth = new BatchTimeoutHelper(largeTimeoutsList, 2); assertEquals(6, bth.getRecommendedTickInterval()); bth = new BatchTimeoutHelper(smallTimeoutsList, 2); assertEquals(2, bth.getRecommendedTickInterval()); bth = new BatchTimeoutHelper(illegalTimeoutsList, 2); assertEquals(2, bth.getRecommendedTickInterval()); }