@Test
public void testIsRestrictedCertificateNullArguments() throws Exception {

    System.setProperty("athenz.crypto.restricted_ou", "other.ou");
    GlobStringsMatcher globStringsMatcher = new GlobStringsMatcher(ATHENZ_PROP_RESTRICTED_OU);
    try (InputStream inStream = new FileInputStream("src/test/resources/ou_tests/restricted_ou_1.pem")) {
        CertificateFactory cf = CertificateFactory.getInstance("X.509");
        X509Certificate cert = (X509Certificate) cf.generateCertificate(inStream);
        // If one of the arguments is null return true (assume restricted cert)
        assertTrue(Crypto.isRestrictedCertificate(cert, null));
        assertTrue(Crypto.isRestrictedCertificate(null, globStringsMatcher));
        assertTrue(Crypto.isRestrictedCertificate(null, null));
        // Both arguments set
        assertFalse(Crypto.isRestrictedCertificate(cert, globStringsMatcher));
    }
}