StormAdminServiceImpl implements StormAdminService { @Override public TopologyResponse stopEnrichmentTopology(boolean stopNow) throws RestException { return createResponse(stormCLIClientWrapper.stopEnrichmentTopology(stopNow), TopologyStatusCode.STOPPED, TopologyStatusCode.STOP_ERROR); } @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 stopEnrichmentTopologyShouldProperlyReturnSuccessTopologyResponse() throws Exception { when(stormCLIClientWrapper.stopEnrichmentTopology(false)).thenReturn(0); TopologyResponse expected = new TopologyResponse(); expected.setSuccessMessage(TopologyStatusCode.STOPPED.toString()); assertEquals(expected, stormAdminService.stopEnrichmentTopology(false)); }