### Question:
KeystoreManager { public Collection<? extends Certificate> readPemCertificateChain(File pemFile) throws KeyStoreException { try (InputStream is = new FileInputStream(pemFile)) { return CertificateFactory.getInstance("X.509").generateCertificates(is); } catch (Exception ex) { throw new KeyStoreException(ex); } }  void copyCert(final File keyStore, final File trustStore, final String alias, final String masterPassword); KeyStore openKeyStore(File source, String storeType, char[] pw); void saveKeyStore(KeyStore keyStore, File dest, char[] pw); void addKeyPair(File keyStore, String storeType, char[] storePw, PrivateKey privKey, Certificate[] certChain, String alias); void addKeyPair(File keyStore, String storeType, char[] storePw, PrivateKey privKey, char[] keyPw, Certificate[] certChain,
            String alias); void changeKeyStorePassword(File keyStore, String storeType, char[] oldPw, char[] newPw); void changeKeyStorePassword(File keyStore, String storeType, char[] oldPw, char[] newPw, boolean changeKeyPasswords); void changeKeyPassword(File keyStore, String storeType, char[] storePw, String alias, char[] oldKeyPw, char[] newKeyPw); PrivateKey readPlainPKCS8PrivateKey(File keyFile); PrivateKey readPlainPKCS8PrivateKey(InputStream is, String algo); Collection<? extends Certificate> readPemCertificateChain(File pemFile); static String getDASCertDN(final RepositoryConfig cfg); static String getInstanceCertDN(final RepositoryConfig cfg); static final String CERTIFICATE_ALIAS; static final String INSTANCE_SECURE_ADMIN_ALIAS; static final String DEFAULT_MASTER_PASSWORD; }### Answer:
@Test public void testLoadingCertificates() throws KeyStoreException { File file = new File(this.getClass().getResource("certificate.pem").getFile()); Collection<? extends Certificate> certChain = manager.readPemCertificateChain(file); assertNotNull(certChain); }