StormStatusServiceImpl implements StormStatusService { protected String getStormUiProperty() { String baseValue = environment.getProperty(STORM_UI_SPRING_PROPERTY); if (!(baseValue.contains(": return "http: } return baseValue; } @Autowired  StormStatusServiceImpl(Environment environment, RestTemplate restTemplate, SensorParserGroupService sensorParserGroupService); @Override SupervisorSummary getSupervisorSummary(); @Override TopologySummary getTopologySummary(); @Override TopologyStatus getTopologyStatus(String name); @Override List<TopologyStatus> getAllTopologyStatus(); @Override TopologyResponse activateTopology(String name); @Override TopologyResponse deactivateTopology(String name);  }
@Test public void testgetStormUiPropertyHttp() { when(environment.getProperty(STORM_UI_SPRING_PROPERTY)).thenReturn(HTTP_STORM_UI); StormStatusServiceImpl serviceImpl = (StormStatusServiceImpl) stormStatusService; assertEquals(HTTP_STORM_UI, serviceImpl.getStormUiProperty()); }
@Test public void testgetStormUiPropertyHttps() { when(environment.getProperty(STORM_UI_SPRING_PROPERTY)).thenReturn(HTTPS_STORM_UI); StormStatusServiceImpl serviceImpl = (StormStatusServiceImpl) stormStatusService; assertEquals(HTTPS_STORM_UI, serviceImpl.getStormUiProperty()); }
@Test public void testgetStormUiPropertyNoProtocol() { when(environment.getProperty(STORM_UI_SPRING_PROPERTY)).thenReturn(NO_PROTOCOL_STORM_UI); StormStatusServiceImpl serviceImpl = (StormStatusServiceImpl) stormStatusService; assertEquals(HTTP_STORM_UI, serviceImpl.getStormUiProperty()); }