### Question:
RecipientServiceImpl implements RecipientService { @Override @CatAnnotation public List<Recipient> findReadyToNotify(NotificationType type) { switch (type) { case BACKUP: return repository.findReadyForBackup(); case REMIND: return repository.findReadyForRemind(); default: throw new IllegalArgumentException(); } }  @Override @CatAnnotation Recipient findByAccountName(String accountName); @Override @CatAnnotation Recipient save(String accountName, Recipient recipient); @Override @CatAnnotation List<Recipient> findReadyToNotify(NotificationType type); @Override @CatAnnotation void markNotified(NotificationType type, Recipient recipient);  }### Answer:
@Test public void shouldFindReadyToNotifyWhenNotificationTypeIsBackup() { final List<Recipient> recipients = ImmutableList.of(new Recipient()); when(repository.findReadyForBackup()).thenReturn(recipients); List<Recipient> found = recipientService.findReadyToNotify(NotificationType.BACKUP); assertEquals(recipients, found); }
@Test public void shouldFindReadyToNotifyWhenNotificationTypeIsRemind() { final List<Recipient> recipients = ImmutableList.of(new Recipient()); when(repository.findReadyForRemind()).thenReturn(recipients); List<Recipient> found = recipientService.findReadyToNotify(NotificationType.REMIND); assertEquals(recipients, found); }