@Test public void stopBeepAlarmTest() { LocalDateTime alarmTime = LocalDateTime.of(2018, 8, 15, 11, 11); Alarm alarm = new Alarm(1, alarmTime, true); when(this.abs.stopBeep(alarm)).thenReturn(this.alarms); this.abs.stopBeep(alarm); verify(this.abs).stopBeep(alarm); assertThat(this.abs.stopBeep(alarm).size(), is(0)); }
public Set<Integer> stopBeep(Alarm alarm) { this.alarmList.remove(alarm.getId()); this.update(); return this.alarmList; }
AlarmBeepService { public Set<Integer> stopBeep(Alarm alarm) { this.alarmList.remove(alarm.getId()); this.update(); return this.alarmList; } }
AlarmBeepService { public Set<Integer> stopBeep(Alarm alarm) { this.alarmList.remove(alarm.getId()); this.update(); return this.alarmList; }  }
AlarmBeepService { public Set<Integer> stopBeep(Alarm alarm) { this.alarmList.remove(alarm.getId()); this.update(); return this.alarmList; }  Set<Integer> beep(Alarm alarm); Set<Integer> stopBeep(Alarm alarm); }
AlarmBeepService { public Set<Integer> stopBeep(Alarm alarm) { this.alarmList.remove(alarm.getId()); this.update(); return this.alarmList; }  Set<Integer> beep(Alarm alarm); Set<Integer> stopBeep(Alarm alarm);  }