@Test public void selectingTwiceARegisteredProtocolWithDifferentDestinationShouldReturnDifferentResults() { assertThat(repositoryStore.select(MEMORY1_REPO)) .isNotEqualTo(repositoryStore.select(MailRepositoryUrl.from("memory1: }
@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);  }