@Test
public void testKeyGenBadCrypto() throws CryptoException, IllegalAccessException, InstantiationException, ClassNotFoundException {

    thrown.expect(CryptoException.class);
    thrown.expectMessage("Unable to generate");
    CryptoPrimitives tmpCrypto = new CryptoPrimitives();
    tmpCrypto.keyGen();
}