### Question:
KeyStoreUtils { public static KeyStore getKeyStore(String keyStoreType) throws KeyStoreException { String keyStoreProvider = getKeyStoreProvider(keyStoreType); if (StringUtils.isNotEmpty(keyStoreProvider)) { try { return KeyStore.getInstance(keyStoreType, keyStoreProvider); } catch (Exception e) { logger.error("Unable to load " + keyStoreProvider + " " + keyStoreType + " keystore. This may cause issues getting trusted CA certificates as well as Certificate Chains for use in TLS.", e); } } return KeyStore.getInstance(keyStoreType); }  static String getKeyStoreProvider(String keyStoreType); static KeyStore getKeyStore(String keyStoreType); static KeyStore getTrustStore(String trustStoreType);  }### Answer:
@Test public void testJksKeyStoreRoundTrip() throws GeneralSecurityException, IOException { testKeyStoreRoundTrip(() -> KeyStoreUtils.getKeyStore(KeystoreType.JKS.toString().toLowerCase())); }
@Test public void testPkcs12KeyStoreBcRoundTrip() throws GeneralSecurityException, IOException { testKeyStoreRoundTrip(() -> KeyStoreUtils.getKeyStore(KeystoreType.PKCS12.toString().toLowerCase())); }
@Test public void testPkcs12KeyStoreRoundTripBcReload() throws GeneralSecurityException, IOException { testKeyStoreRoundTrip(() -> KeyStore.getInstance(KeystoreType.PKCS12.toString().toLowerCase()), () -> KeyStoreUtils.getKeyStore(KeystoreType.PKCS12.toString().toLowerCase()), BAD_KEY_STORE_TEST_PASSWORD_DONT_USE_THIS); }