@Test
public void testCertificateToDER() throws Exception {

    KeyPair testKeyPair = crypto.keyGen();
    String certRequest = crypto.generateCertificationRequest("common name", testKeyPair);
    //  String pemGenCert = crypto.certificationRequestToPEM(certRequest);
    Assert.assertTrue(crypto.certificateToDER(certRequest).length > 0);
}