ConsolidationScoredPreferenceForSmallHosts extends ConsolidationAlgorithmBase { protected float getCloudCpuCapacity(CloudResources cloudResources) { return cloudResources.getCpuSpeed() * cloudResources.getCpus(); }  @Override List<HostResources> rankHosts(List<HostResources> hostsList); @Override List<HostResources> rankHostToPowerOff(List<HostResources> idleHosts);  }
@Test public void getCloudCpuCapacityTest() { CloudResources cloud = new CloudResources(null, 0, 0, 3000l, 2000, 4); Assert.assertEquals(8000, spyAlgorithm.getCloudCpuCapacity(cloud), 0.0); }