@Test public void convertSingleAwsVaultKeyPair() { final AWSKeyPair keyPair = new AWSKeyPair("pub", "priv"); Collection<KeyPair> result = converter.convert(Collections.singletonList(keyPair)); assertThat(result).hasSize(1); KeyPair resultKeyPair = result.iterator().next(); KeyPair expected = new KeyPair(PublicKey.from(decodeBase64("publicSecret")), PrivateKey.from(decodeBase64("privSecret"))); assertThat(resultKeyPair).isEqualToComparingFieldByField(expected); }
public Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs) { return configKeyPairs .stream() .map(this::convert) .collect(Collectors.toList()); }
KeyPairConverter { public Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs) { return configKeyPairs .stream() .map(this::convert) .collect(Collectors.toList()); } }
KeyPairConverter { public Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs) { return configKeyPairs .stream() .map(this::convert) .collect(Collectors.toList()); } KeyPairConverter(Config config, EnvironmentVariableProvider envProvider); }
KeyPairConverter { public Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs) { return configKeyPairs .stream() .map(this::convert) .collect(Collectors.toList()); } KeyPairConverter(Config config, EnvironmentVariableProvider envProvider); Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs); List<PublicKey> convert(List<String> values); }
KeyPairConverter { public Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs) { return configKeyPairs .stream() .map(this::convert) .collect(Collectors.toList()); } KeyPairConverter(Config config, EnvironmentVariableProvider envProvider); Collection<KeyPair> convert(Collection<ConfigKeyPair> configKeyPairs); List<PublicKey> convert(List<String> values);  }