@Test public void getUnusedCpuPercWhenThereIsNoOverload() { assertEquals(0.25, new ServerLoad(0.75, 0.1, 0.1).getUnusedCpuPerc(), DELTA_DOUBLE_COMP); }
public double getUnusedCpuPerc() { return cpuLoad > 1 ? 0 : (1 - cpuLoad); }
ServerLoad { public double getUnusedCpuPerc() { return cpuLoad > 1 ? 0 : (1 - cpuLoad); } }
ServerLoad { public double getUnusedCpuPerc() { return cpuLoad > 1 ? 0 : (1 - cpuLoad); } ServerLoad(double cpuLoad, double ramLoad, double diskLoad); }
ServerLoad { public double getUnusedCpuPerc() { return cpuLoad > 1 ? 0 : (1 - cpuLoad); } ServerLoad(double cpuLoad, double ramLoad, double diskLoad); double getTotalOverload(); double getCpuLoad(); double getRamLoad(); double getDiskLoad(); double getUnusedCpuPerc(); double getUnusedRamPerc(); double getUnusedDiskPerc(); @Override String toString(); boolean isIdle(); }
ServerLoad { public double getUnusedCpuPerc() { return cpuLoad > 1 ? 0 : (1 - cpuLoad); } ServerLoad(double cpuLoad, double ramLoad, double diskLoad); double getTotalOverload(); double getCpuLoad(); double getRamLoad(); double getDiskLoad(); double getUnusedCpuPerc(); double getUnusedRamPerc(); double getUnusedDiskPerc(); @Override String toString(); boolean isIdle();  }