### Question:
KeyStore { void storeAuthorityEntry(final AuthorityEntry authorityEntry) throws KeyStoreException { this.javaKeyStore.setCertificateEntry( authorityEntry.getAlias(), authorityEntry.getCertificate() ); this.flush(); } @Builder  KeyStore(
            @NonNull final Path keyStoreFilePath,
            @NonNull final KeyStoreType keyStoreType,
            @NonNull final String keyStorePassword);   }### Answer:
@Test void testStoreBundle_in_JKS_KeyStore() throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException { val fileName = RandomStringUtils.randomAlphabetic(10); val keyStoreType = KeyStoreType.JKS; val keyStorePassword = RandomStringUtils.randomAlphanumeric(12); keyStoreFilePath = Paths.get(fileName); val keyStore = KeyStore.builder() .keyStoreFilePath(keyStoreFilePath) .keyStoreType(keyStoreType) .keyStorePassword(keyStorePassword) .build(); val authority1Alias = x509Bundle.getTrustDomain().getName() + ".1"; val authority2Alias = x509Bundle.getTrustDomain().getName() + ".2"; val entry1 = AuthorityEntry.builder() .alias(authority1Alias) .certificate(x509Bundle.getX509Authorities().iterator().next()) .build(); val entry2 = AuthorityEntry.builder() .alias(authority2Alias) .certificate(x509Bundle.getX509Authorities().iterator().next()) .build(); keyStore.storeAuthorityEntry(entry1); keyStore.storeAuthorityEntry(entry2); checkBundleEntries(keyStoreFilePath, keyStorePassword, keyStoreType, authority1Alias); checkBundleEntries(keyStoreFilePath, keyStorePassword, keyStoreType, authority2Alias); }