### Question:
AbstractPwm extends AbstractPinFeature implements Pwm { public void enable() { enableImpl(); enabled = true; } AbstractPwm(Pin pin); String getName(); void enable(); void disable(); boolean isEnabled(); void setDuty(double duty); double getDuty(); void setFrequency(double frequency); double getFrequency();  }### Answer:
@Test public void testEnable() { MockedPwm pwm = pin.as(MockedPwm.class); TestCase.assertFalse(pwm.enableImplCalled()); TestCase.assertFalse(pwm.disableImplCalled()); pwm.enable(); TestCase.assertTrue(pwm.isEnabled()); TestCase.assertTrue(pwm.enableImplCalled()); TestCase.assertFalse(pwm.disableImplCalled()); pwm.disable(); TestCase.assertFalse(pwm.isEnabled()); TestCase.assertTrue(pwm.disableImplCalled()); }