StormAdminServiceImpl implements StormAdminService { @Override public TopologyResponse startEnrichmentTopology() throws RestException { return createResponse(stormCLIClientWrapper.startEnrichmentTopology(), TopologyStatusCode.STARTED, TopologyStatusCode.START_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 startEnrichmentTopologyShouldProperlyReturnSuccessTopologyResponse() throws Exception { when(stormCLIClientWrapper.startEnrichmentTopology()).thenReturn(0); TopologyResponse expected = new TopologyResponse(); expected.setSuccessMessage(TopologyStatusCode.STARTED.toString()); assertEquals(expected, stormAdminService.startEnrichmentTopology()); }