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