### Question:
Pkix { public static PrivateKey getPrivateKey(String keyFile, String password) throws IOException, GeneralSecurityException { InputStream in = new FileInputStream("/path/to/pkcs8_private_key.der"); return getPrivateKey(in, password); }  static List<Certificate> getCerts(String certFile); static List<Certificate> getCerts(InputStream inputStream); static PrivateKey getPrivateKey(String keyFile, String password); static PrivateKey getPrivateKey(InputStream inputStream, String password);  }### Answer:
@Test public void loadKey() throws GeneralSecurityException, IOException { InputStream res = getClass().getResourceAsStream("/userkey.pem"); PrivateKey key = Pkix.getPrivateKey(res, null); Assert.assertNotNull(key); }