@Test public void getOverallHealth () { when(platform1.getPlatformHealth()).thenReturn(PlatformHealth.OK); when(platform2.getPlatformHealth()).thenReturn(PlatformHealth.DEGRADED); Assert.assertEquals(PlatformHealth.DEGRADED, platformManager.getOverallHealth()); when(platform1.getPlatformHealth()).thenReturn(PlatformHealth.DEGRADED); when(platform2.getPlatformHealth()).thenReturn(PlatformHealth.OK); Assert.assertEquals(PlatformHealth.DEGRADED, platformManager.getOverallHealth()); when(platform1.getPlatformHealth()).thenReturn(PlatformHealth.DEGRADED); when(platform2.getPlatformHealth()).thenReturn(PlatformHealth.FAILED); Assert.assertEquals(PlatformHealth.FAILED, platformManager.getOverallHealth()); when(platform1.getPlatformHealth()).thenReturn(PlatformHealth.FAILED); when(platform2.getPlatformHealth()).thenReturn(PlatformHealth.OK); Assert.assertEquals(PlatformHealth.FAILED, platformManager.getOverallHealth()); when(platform1.getPlatformHealth()).thenReturn(PlatformHealth.FAILED); when(platform2.getPlatformHealth()).thenReturn(PlatformHealth.FAILED); Assert.assertEquals(PlatformHealth.FAILED, platformManager.getOverallHealth()); when(platform1.getPlatformHealth()).thenReturn(PlatformHealth.OK); when(platform2.getPlatformHealth()).thenReturn(PlatformHealth.OK); Assert.assertEquals(PlatformHealth.OK, platformManager.getOverallHealth()); }
PlatformHealth getOverallHealth () { return getPlatformHealthOfPlatforms(getPlatforms()); }
PlatformManager { PlatformHealth getOverallHealth () { return getPlatformHealthOfPlatforms(getPlatforms()); } }
PlatformManager { PlatformHealth getOverallHealth () { return getPlatformHealthOfPlatforms(getPlatforms()); } @Autowired  PlatformManager();   PlatformManager(Collection<Platform> platforms); }
PlatformManager { PlatformHealth getOverallHealth () { return getPlatformHealthOfPlatforms(getPlatforms()); } @Autowired  PlatformManager();   PlatformManager(Collection<Platform> platforms); Collection<Platform> getPlatforms(); Optional<Platform> getNextPlatformForExperiment(boolean force); }
PlatformManager { PlatformHealth getOverallHealth () { return getPlatformHealthOfPlatforms(getPlatforms()); } @Autowired  PlatformManager();   PlatformManager(Collection<Platform> platforms); Collection<Platform> getPlatforms(); Optional<Platform> getNextPlatformForExperiment(boolean force);  }