@Test public void test_key_pair_config_create_never_return_null() { List<KeyPairConfig> keyPairConfigs = underTest.create(KEY_STORE_NAME, keyStore); assertThat(keyPairConfigs).isNotNull(); assertThat(keyPairConfigs).hasSize(0); }
List<KeyPairConfig> create(String keyStoreName, KeyStore keyStore) { List<KeyPairConfig> keyPairConfigs = new ArrayList<>(); try { Enumeration<String> aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { KeyPairConfig keyPairConfig = createKeyPairFromAlias(aliases.nextElement(), keyStoreName); keyPairConfigs.add(keyPairConfig); } } catch (KeyStoreException e) { throw SeedException.wrap(e, CryptoErrorCode.UNEXPECTED_EXCEPTION); } return keyPairConfigs; }
KeyPairConfigFactory { List<KeyPairConfig> create(String keyStoreName, KeyStore keyStore) { List<KeyPairConfig> keyPairConfigs = new ArrayList<>(); try { Enumeration<String> aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { KeyPairConfig keyPairConfig = createKeyPairFromAlias(aliases.nextElement(), keyStoreName); keyPairConfigs.add(keyPairConfig); } } catch (KeyStoreException e) { throw SeedException.wrap(e, CryptoErrorCode.UNEXPECTED_EXCEPTION); } return keyPairConfigs; } }
KeyPairConfigFactory { List<KeyPairConfig> create(String keyStoreName, KeyStore keyStore) { List<KeyPairConfig> keyPairConfigs = new ArrayList<>(); try { Enumeration<String> aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { KeyPairConfig keyPairConfig = createKeyPairFromAlias(aliases.nextElement(), keyStoreName); keyPairConfigs.add(keyPairConfig); } } catch (KeyStoreException e) { throw SeedException.wrap(e, CryptoErrorCode.UNEXPECTED_EXCEPTION); } return keyPairConfigs; } KeyPairConfigFactory(CryptoConfig cryptoConfig); }
KeyPairConfigFactory { List<KeyPairConfig> create(String keyStoreName, KeyStore keyStore) { List<KeyPairConfig> keyPairConfigs = new ArrayList<>(); try { Enumeration<String> aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { KeyPairConfig keyPairConfig = createKeyPairFromAlias(aliases.nextElement(), keyStoreName); keyPairConfigs.add(keyPairConfig); } } catch (KeyStoreException e) { throw SeedException.wrap(e, CryptoErrorCode.UNEXPECTED_EXCEPTION); } return keyPairConfigs; } KeyPairConfigFactory(CryptoConfig cryptoConfig);  }
KeyPairConfigFactory { List<KeyPairConfig> create(String keyStoreName, KeyStore keyStore) { List<KeyPairConfig> keyPairConfigs = new ArrayList<>(); try { Enumeration<String> aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { KeyPairConfig keyPairConfig = createKeyPairFromAlias(aliases.nextElement(), keyStoreName); keyPairConfigs.add(keyPairConfig); } } catch (KeyStoreException e) { throw SeedException.wrap(e, CryptoErrorCode.UNEXPECTED_EXCEPTION); } return keyPairConfigs; } KeyPairConfigFactory(CryptoConfig cryptoConfig);   }