@Test
public void testLoadTrustStoreWithWrongFileType() throws Exception {

    // Trying to load a JKS file with PEM loader should fail
    String path = x509TestContext.getTrustStoreFile(KeyStoreFileType.JKS)
            .getAbsolutePath();
    KeyStore ts = new PEMFileLoader.Builder()
            .setTrustStorePath(path)
            .setTrustStorePassword(x509TestContext.getTrustStorePassword())
            .build()
            .loadTrustStore();
    Assert.assertEquals(0, ts.size());
}