SchedulerActor { public void deleteEntry(final DeleteEntryQueryMessage message) throws ReadValueException, EntryStorageAccessException, EntryScheduleException { try { service.getEntryStorage().getEntry(message.getEntryId()).cancel(); } catch (EntryNotFoundException ignore) { } } SchedulerActor(final IObject args); void addEntry(final AddEntryQueryMessage message); void addEntryWithSettingId(final SetEntryIdMessage message); void addEntryList(final AddEntryQueryListMessage message); void listEntries(final ListEntriesQueryMessage message); void deleteEntry(final DeleteEntryQueryMessage message); void start(final StartStopMessage message); void stop(final StartStopMessage message); void configure(final ConfigureQueryMessage message);  }
@Test public void Should_deleteEntry() throws Exception { when(storage.getEntry("entry-to-delete-id")).thenReturn(entryMock); SchedulerActor actor = new SchedulerActor(args); actor.deleteEntry(deleteEntryQueryMessage); verify(entryMock).cancel(); }