@Test(expected = KeyStoreException.class)
public void testLoadKeyStoreWithWrongFileType() throws Exception {

    // Trying to load a JKS file with PEM loader should fail
    String path = x509TestContext.getKeyStoreFile(KeyStoreFileType.JKS)
            .getAbsolutePath();
    new PEMFileLoader.Builder()
            .setKeyStorePath(path)
            .setKeyStorePassword(x509TestContext.getKeyStorePassword())
            .build()
            .loadKeyStore();
}