@Test
public void testGenericCostModel2() {
ResourceCostModel.TimeBoundary[] timeBoundaries =
new ResourceCostModel.TimeBoundary[]{new ResourceCostModel.TimeBoundary(5, 1000, ResourceCostModel.TimeBoundary.HOURS),
new ResourceCostModel.TimeBoundary(5, 10000, ResourceCostModel.TimeBoundary.DAYS)};
GenericCostModel gcm = new GenericCostModel(0.01, timeBoundaries);
System.out.println("Testing " + gcm.getClass().getName() + "\n");
System.out.println(gcm.getDescription());
Assert.assertTrue("Cost per unit for 2 seconds should be 0.01", gcm.getCostPerUnit(twoSeconds)==0.01);
Assert.assertTrue("Cost per unit for 6 minutes should be 1.0", gcm.getCostPerUnit(sixMinutes)==0.01);
Assert.assertTrue("Cost per unit for 2 hours should be 1.0", gcm.getCostPerUnit(twoHours)==0.01);
Assert.assertTrue("Cost per unit for 6 hours should be 10", gcm.getCostPerUnit(sixHours)==10);
Assert.assertTrue("Cost per unit for 2 days should be 10", gcm.getCostPerUnit(twoDays)==10);
Assert.assertTrue("Cost per unit for 10 days should be 100", gcm.getCostPerUnit(tenDays)==100);
}