### Question:
TimerLogic implements RunnableService { public String deleteTimer(int timerNumber) { Timer t = getTimer(timerNumber); this.timerbeep.stopBeep(t); this.timerStorage.deleteById(t.getPersistentId()); return this.timerS + t.getId() + " deleted"; }  Runnable createTimerRunnable(Timer timer); Timer setTimer(LocalDateTime timerTime); int searchTimerId(); String deleteAllTimers(); String deleteTimer(int timerNumber); String stopRinging(); Timer getTimer(int timerNumber); List<Timer> getAllTimers(); Timer pauseTimer(Timer timer); Timer reactivateTimer(Timer timer); @Override void start(); @Override void stop();  }### Answer:
@Test protected void testDeleteTimer() { List<Timer> returnedTimers = createTimers(3, true); this.timerNumber = 2; when(this.timerStorage.getAll()).thenReturn(returnedTimers); assertThat(this.tlogic.deleteTimer(2), is("Timer " + this.timerNumber + " deleted")); }
@Test protected void testDeleteTimerNotFound() { assertThrows(NoSuchElementException.class, () -> this.tlogic.deleteTimer(4)); }