ConfigurableIngestTopology { StormParallelismConfig getStormParallelismConfig(Configuration conf) { return new StormParallelismConfig(conf); }  static void main(String[] args);  }
@Test public void testGetStormParallelismConfig(@Injectable Configuration conf) throws Exception { int parallelismHint = 1; new Expectations() {{ conf.getInt(PARALLELISM_HINT, PARALLELISM_HINT_DEFAULT); result = parallelismHint; conf.getInt(NUM_TASKS, parallelismHint); result = parallelismHint; }}; StormParallelismConfig parallelismConfig = topology.getStormParallelismConfig(conf); assertThat(parallelismConfig.getParallelismHint(), is(parallelismHint)); assertThat(parallelismConfig.getNumTasks(), is(parallelismHint)); }