@Test public void testSameHostnameDifferentKeysFirstOneWins() { SshUriProperties sshUriProperties = mainRepoPropertiesFixture(); addRepoProperties(sshUriProperties, SshUri.builder().uri(URI1) .privateKey(PRIVATE_KEY1) .hostKey(HOST_KEY1) .hostKeyAlgorithm(ALGO1) .buildAsNestedRepo(), "repo2"); SshUriPropertyProcessor sshUriPropertyProcessor = new SshUriPropertyProcessor(sshUriProperties); Map<String, SshUri> sshKeysByHostname = sshUriPropertyProcessor.getSshKeysByHostname(); assertThat(sshKeysByHostname.values(), hasSize(1)); SshUri sshKey = sshKeysByHostname.get(HOST1); assertMainRepo(sshKey); }
public Map<String, SshUri> getSshKeysByHostname() { return extractNestedProperties(sshUriProperties); }
SshUriPropertyProcessor { public Map<String, SshUri> getSshKeysByHostname() { return extractNestedProperties(sshUriProperties); } }
SshUriPropertyProcessor { public Map<String, SshUri> getSshKeysByHostname() { return extractNestedProperties(sshUriProperties); } SshUriPropertyProcessor(SshUriProperties sshUriProperties); }
SshUriPropertyProcessor { public Map<String, SshUri> getSshKeysByHostname() { return extractNestedProperties(sshUriProperties); } SshUriPropertyProcessor(SshUriProperties sshUriProperties); Map<String, SshUri> getSshKeysByHostname(); }
SshUriPropertyProcessor { public Map<String, SshUri> getSshKeysByHostname() { return extractNestedProperties(sshUriProperties); } SshUriPropertyProcessor(SshUriProperties sshUriProperties); Map<String, SshUri> getSshKeysByHostname();  }