@Test
    void verifyDoIfNull() {
        var supplier = FunctionUtils.doIfNotNull(new Object(), () -> {
            throw new IllegalArgumentException();
        }, Suppliers.ofInstance(Boolean.FALSE));
        assertFalse(supplier.get());

        supplier = FunctionUtils.doIfNotNull(null, () -> Boolean.TRUE, Suppliers.ofInstance(Boolean.FALSE));
        assertFalse(supplier.get());
        supplier = FunctionUtils.doIfNotNull(new Object(), () -> Boolean.TRUE, Suppliers.ofInstance(Boolean.FALSE));
        assertTrue(supplier.get());
    }
This is {@link FunctionUtilsTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/function/FunctionUtilsTests.java