@Test public void listMailRepositoriesShouldReturnEmptyWhenEmpty() { when(mailRepositoryStore.getPaths()).thenReturn(Stream.empty()); assertThat(testee.listMailRepositories()).isEmpty(); }
public Stream<SingleMailRepositoryResponse> listMailRepositories() { return mailRepositoryStore .getPaths() .map(SingleMailRepositoryResponse::new); }
MailRepositoryStoreService { public Stream<SingleMailRepositoryResponse> listMailRepositories() { return mailRepositoryStore .getPaths() .map(SingleMailRepositoryResponse::new); } }
MailRepositoryStoreService { public Stream<SingleMailRepositoryResponse> listMailRepositories() { return mailRepositoryStore .getPaths() .map(SingleMailRepositoryResponse::new); } @Inject  MailRepositoryStoreService(MailRepositoryStore mailRepositoryStore); }
MailRepositoryStoreService { public Stream<SingleMailRepositoryResponse> listMailRepositories() { return mailRepositoryStore .getPaths() .map(SingleMailRepositoryResponse::new); } @Inject  MailRepositoryStoreService(MailRepositoryStore mailRepositoryStore); Stream<SingleMailRepositoryResponse> listMailRepositories(); MailRepository createMailRepository(MailRepositoryPath repositoryPath, String protocol); Optional<List<MailKeyDTO>> listMails(MailRepositoryPath path, Offset offset, Limit limit); Optional<Long> size(MailRepositoryPath path); Optional<MailDto> retrieveMail(MailRepositoryPath path, MailKey mailKey, Set<AdditionalField> additionalAttributes); Optional<MimeMessage> retrieveMessage(MailRepositoryPath path, MailKey mailKey); void deleteMail(MailRepositoryPath path, MailKey mailKey); Task createClearMailRepositoryTask(MailRepositoryPath path); Stream<MailRepository> getRepositories(MailRepositoryPath path); }
MailRepositoryStoreService { public Stream<SingleMailRepositoryResponse> listMailRepositories() { return mailRepositoryStore .getPaths() .map(SingleMailRepositoryResponse::new); } @Inject  MailRepositoryStoreService(MailRepositoryStore mailRepositoryStore); Stream<SingleMailRepositoryResponse> listMailRepositories(); MailRepository createMailRepository(MailRepositoryPath repositoryPath, String protocol); Optional<List<MailKeyDTO>> listMails(MailRepositoryPath path, Offset offset, Limit limit); Optional<Long> size(MailRepositoryPath path); Optional<MailDto> retrieveMail(MailRepositoryPath path, MailKey mailKey, Set<AdditionalField> additionalAttributes); Optional<MimeMessage> retrieveMessage(MailRepositoryPath path, MailKey mailKey); void deleteMail(MailRepositoryPath path, MailKey mailKey); Task createClearMailRepositoryTask(MailRepositoryPath path); Stream<MailRepository> getRepositories(MailRepositoryPath path);  }