### Question:
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { public EnergyUsagePrediction predictTotalEnergy(Host host, double usageCPU, TimePeriod timePeriod) { EnergyUsagePrediction answer = new EnergyUsagePrediction(host); PolynomialSplineFunction model = retrieveModel(host).getFunction(); double powerUsed = model.value(getCpuUsageValue(model, getCpuUsageValue(model, usageCPU))); answer.setAvgPowerUsed(powerUsed); answer.setTotalEnergyUsed(powerUsed * ((double) TimeUnit.SECONDS.toHours(timePeriod.getDuration()))); answer.setDuration(timePeriod); return answer; } CpuOnlySplinePolynomialEnergyPredictor();  CpuOnlySplinePolynomialEnergyPredictor(PropertiesConfiguration config); @Override EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration); @Override EnergyUsagePrediction getVMPredictedEnergy(VM vm, Collection<VM> virtualMachines, Host host, TimePeriod timePeriod); EnergyUsagePrediction predictTotalEnergy(Host host, double usageCPU, TimePeriod timePeriod); @Override double predictPowerUsed(Host host); @Override double predictPowerUsed(Host host, double usageCPU); @Override double getSumOfSquareError(Host host); @Override double getRootMeanSquareError(Host host); @Override String toString(); @Override void printFitInformation(Host host);  }### Answer:
@Test public void testPredictTotalEnergy() { System.out.println("predictTotalEnergy"); setCalibrationData(host); host.setRamMb(32244); double usageCPU = 0.0; TimePeriod timePeriod = null; CpuOnlySplinePolynomialEnergyPredictor instance = new CpuOnlySplinePolynomialEnergyPredictor(); EnergyUsagePrediction expResult = null; EnergyUsagePrediction result = instance.predictTotalEnergy(host, usageCPU, timePeriod); assertEquals(expResult, result); fail("The test case is a prototype."); }