@Test
public void testInitInvalidCertFormat() throws Exception {

    thrown.expect(CryptoException.class);
    String oldVal = null;
    try {
        // Set the cert format to something invalid
        oldVal = setConfigProperty(Config.CERTIFICATE_FORMAT, "abc123");
        CryptoPrimitives crypto = new CryptoPrimitives();
        crypto.init();
    } finally {
        // Reset the property for subsequent tests
        setConfigProperty(Config.CERTIFICATE_FORMAT, oldVal);
    }
}