@Test public void getPathsResultsShouldNotBeDuplicatedWithDifferentProtocols() { repositoryStore.select(MEMORY1_REPO); repositoryStore.select(MEMORY2_REPO); assertThat(repositoryStore.getPaths()).containsExactly(PATH_REPO); }
@Override public MailRepository select(MailRepositoryUrl mailRepositoryUrl) { return destinationToRepositoryAssociations.computeIfAbsent(mailRepositoryUrl, Throwing.function(this::createNewMailRepository).sneakyThrow()); }
MemoryMailRepositoryStore implements MailRepositoryStore, Startable { @Override public MailRepository select(MailRepositoryUrl mailRepositoryUrl) { return destinationToRepositoryAssociations.computeIfAbsent(mailRepositoryUrl, Throwing.function(this::createNewMailRepository).sneakyThrow()); } }
MemoryMailRepositoryStore implements MailRepositoryStore, Startable { @Override public MailRepository select(MailRepositoryUrl mailRepositoryUrl) { return destinationToRepositoryAssociations.computeIfAbsent(mailRepositoryUrl, Throwing.function(this::createNewMailRepository).sneakyThrow()); } @Inject  MemoryMailRepositoryStore(MailRepositoryUrlStore urlStore, MailRepositoryLoader mailRepositoryLoader, MailRepositoryStoreConfiguration configuration); }
MemoryMailRepositoryStore implements MailRepositoryStore, Startable { @Override public MailRepository select(MailRepositoryUrl mailRepositoryUrl) { return destinationToRepositoryAssociations.computeIfAbsent(mailRepositoryUrl, Throwing.function(this::createNewMailRepository).sneakyThrow()); } @Inject  MemoryMailRepositoryStore(MailRepositoryUrlStore urlStore, MailRepositoryLoader mailRepositoryLoader, MailRepositoryStoreConfiguration configuration); @Override Optional<Protocol> defaultProtocol(); void init(); @Override Stream<MailRepositoryUrl> getUrls(); @Override Optional<MailRepository> get(MailRepositoryUrl url); @Override Stream<MailRepository> getByPath(MailRepositoryPath path); @Override MailRepository select(MailRepositoryUrl mailRepositoryUrl); }
MemoryMailRepositoryStore implements MailRepositoryStore, Startable { @Override public MailRepository select(MailRepositoryUrl mailRepositoryUrl) { return destinationToRepositoryAssociations.computeIfAbsent(mailRepositoryUrl, Throwing.function(this::createNewMailRepository).sneakyThrow()); } @Inject  MemoryMailRepositoryStore(MailRepositoryUrlStore urlStore, MailRepositoryLoader mailRepositoryLoader, MailRepositoryStoreConfiguration configuration); @Override Optional<Protocol> defaultProtocol(); void init(); @Override Stream<MailRepositoryUrl> getUrls(); @Override Optional<MailRepository> get(MailRepositoryUrl url); @Override Stream<MailRepository> getByPath(MailRepositoryPath path); @Override MailRepository select(MailRepositoryUrl mailRepositoryUrl);  }