BatchTimeoutHelper { public int getMaxBatchTimeout() { if (!initialized) {this.init();} return maxBatchTimeoutAllowedSecs; } BatchTimeoutHelper( Supplier<List<Integer>> listAllConfiguredTimeouts
          , int batchTimeoutDivisor
          ); int getMaxBatchTimeout(); int getRecommendedTickInterval();  }
@Test public void testGetMaxBatchTimeout() throws Exception { assertEquals(30, Utils.readStormConfig().getOrDefault(Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS, 0)); BatchTimeoutHelper bth; bth = new BatchTimeoutHelper(defaultConfigList, 1); assertEquals(14, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(defaultConfigList, 2); assertEquals(6, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(defaultConfigList, 3); assertEquals(4, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(defaultConfigList, 4); assertEquals(2, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(defaultConfigList, 6); assertEquals(1, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(defaultConfigList, 20); assertEquals(1, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(disabledConfigList, 2); assertEquals(6, bth.getMaxBatchTimeout()); bth = new BatchTimeoutHelper(smallTimeoutsList, 2); assertEquals(6, bth.getMaxBatchTimeout()); }