StormAdminServiceImpl implements StormAdminService { @Override public Map<String, String> getStormClientStatus() throws RestException { return stormCLIClientWrapper.getStormClientStatus(); } @Autowired  StormAdminServiceImpl(StormCLIWrapper stormCLIClientWrapper,
                                 GlobalConfigService globalConfigService,
                                 SensorParserConfigService sensorParserConfigService,
                                 SensorParserGroupService sensorParserGroupService,
                                 StormStatusService stormStatusService); @Override TopologyResponse startParserTopology(String name); @Override TopologyResponse stopParserTopology(String name, boolean stopNow); @Override TopologyResponse startEnrichmentTopology(); @Override TopologyResponse stopEnrichmentTopology(boolean stopNow); @Override TopologyResponse startIndexingTopology(String scriptPath); @Override TopologyResponse stopIndexingTopology(String name, boolean stopNow); @Override Map<String, String> getStormClientStatus();  }
@Test public void getStormClientStatusShouldProperlyReturnStatus() throws Exception { final Map<String, String> status = new HashMap() {{ put("status", "statusValue"); }}; when(stormCLIClientWrapper.getStormClientStatus()).thenReturn(status); assertEquals(new HashMap() {{ put("status", "statusValue"); }}, stormAdminService.getStormClientStatus()); }