@Test protected void testDeleteAlarm() { List<Alarm> returnedAlarms = createAlarms(3, false); this.alarmNumber = 2; when(this.alarmStorage.getAll()).thenReturn(returnedAlarms); assertThat(this.acl.deleteAlarm(2), is("Alarm " + this.alarmNumber + " deleted")); }
protected String deleteAlarm(int alarmNumber) { Alarm a = getAlarm(alarmNumber); deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); return this.alarmS + a.getId() + " deleted"; }
AlarmClockLogic implements RunnableService { protected String deleteAlarm(int alarmNumber) { Alarm a = getAlarm(alarmNumber); deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); return this.alarmS + a.getId() + " deleted"; } }
AlarmClockLogic implements RunnableService { protected String deleteAlarm(int alarmNumber) { Alarm a = getAlarm(alarmNumber); deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); return this.alarmS + a.getId() + " deleted"; }  }
AlarmClockLogic implements RunnableService { protected String deleteAlarm(int alarmNumber) { Alarm a = getAlarm(alarmNumber); deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); return this.alarmS + a.getId() + " deleted"; }  String stopRinging(); @Override void start(); @Override void stop(); }
AlarmClockLogic implements RunnableService { protected String deleteAlarm(int alarmNumber) { Alarm a = getAlarm(alarmNumber); deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); return this.alarmS + a.getId() + " deleted"; }  String stopRinging(); @Override void start(); @Override void stop();  }