@Test public void electricCarRefuelTest() { ElectricCar ec = new ElectricCar(); assertEquals( "electric car 2 should start with a fuel level of 1000", 1000f, ec.checkFuelLevel(), 0.01f); ec.turnOn(); ec.drive(); assertEquals( "electric car 2 should now have a fuel level of 980", 980f, ec.checkFuelLevel(), 0.01f); ec.refuel(); assertEquals( "electric car 2 should still have a fuel level of 980, since it was on", 980f, ec.checkFuelLevel(), 0.01f); ec.turnOff(); ec.refuel(); assertEquals( "electric Car 2 should now have a fuel level of 1000 after refueling", 1000f, ec.checkFuelLevel(), 0.01f); }