### Question:
AlarmClockLogic implements RunnableService { protected String resetAlarms() { int counter = 0; for (Alarm a : this.alarmStorage.getAll()) { counter++; deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); } if (counter == 0) { return "No alarms found"; } return counter + " alarms deleted"; }  String stopRinging(); @Override void start(); @Override void stop();  }### Answer:
@Test public void testResetAlarms() { List<Alarm> returnedAlarms = createAlarms(3, false); this.alarmNumber = 2; when(this.alarmStorage.getAll()).thenReturn(returnedAlarms); assertThat(this.acl.resetAlarms(), is("3 alarms deleted")); }
@Test public void testResetAlarmsNoAlarms() { assertThat(this.acl.resetAlarms(), is("No alarms found")); }