@Test
    void verifyDefaultImpl() {
        val request = new MockHttpServletRequest();
        val body = new LinkedMultiValueMap<String, String>();
        val factory = mock(RestHttpRequestCredentialFactory.class);
        when(factory.fromAuthentication(any(), any(), any(), any())).thenCallRealMethod();
        when(factory.getOrder()).thenCallRealMethod();

        assertEquals(Integer.MAX_VALUE, factory.getOrder());
        assertTrue(factory.fromAuthentication(request, body,
            CoreAuthenticationTestUtils.getAuthentication(),
            mock(MultifactorAuthenticationProvider.class)).isEmpty());
    }
This is {@link ChainingRestHttpRequestCredentialFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-rest/src/test/java/org/apereo/cas/rest/factory/ChainingRestHttpRequestCredentialFactoryTests.java