RSAUtil { public static KeyPair generateRSAKeyPair() { return generateRSAKeyPair(2048); }  static KeyPair generateRSAKeyPair(); static KeyPair generateRSAKeyPair(int size); static String buildDN(String country, String state, String locality, String org, String orgUnit, String commonName); static CertificatePair generateCertificate(String DN, SerialNum serial, int days, int keySize, KeyType type, CertificatePair issuer); static CertificatePair generateCertificate(String DN, SerialNum serial, int days, int keySize, KeyType type, PublicKey key, CertificatePair issuer);  }
@Test public void testGenerateRSAKeyPair() { KeyPair pair = RSAUtil.generateRSAKeyPair(512); assertThat(pair, is(notNullValue())); }