### Question:
LockSwitch { public boolean isSwitched() { return switched; } LockSwitch(); boolean isSwitched(); void setSwitched(boolean switched);  }### Answer:
@Test public void testIsSwitched() { LOG.info("isSwitched"); LOG.info("Secenario 1: Initial State"); LockSwitch instance = new LockSwitch(); boolean expResult = false; boolean result = instance.isSwitched(); assertEquals(expResult, result); LOG.info("Secenario 2: After trip State"); instance = new LockSwitch(); expResult = true; instance.setSwitched(true); result = instance.isSwitched(); assertEquals(expResult, result); }