@Test public void getUnusedDiskPercWhenThereIsNoOverload() { assertEquals(0.6, new ServerLoad(0.1, 0.1, 0.4).getUnusedDiskPerc(), DELTA_DOUBLE_COMP); }
public double getUnusedDiskPerc() { return diskLoad > 1 ? 0 : (1 - diskLoad); }
ServerLoad { public double getUnusedDiskPerc() { return diskLoad > 1 ? 0 : (1 - diskLoad); } }
ServerLoad { public double getUnusedDiskPerc() { return diskLoad > 1 ? 0 : (1 - diskLoad); } ServerLoad(double cpuLoad, double ramLoad, double diskLoad); }
ServerLoad { public double getUnusedDiskPerc() { return diskLoad > 1 ? 0 : (1 - diskLoad); } 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 getUnusedDiskPerc() { return diskLoad > 1 ? 0 : (1 - diskLoad); } 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();  }