@Test
    void verifyDoAndNeverRetry() {
        val count = new AtomicInteger();
        assertThrows(IllegalArgumentException.class, () -> FunctionUtils.doAndRetry(retryContext -> {
            count.incrementAndGet();
            throw new IllegalArgumentException("Failed to execute");
        }, -1));
        assertEquals(1, count.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