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