@Test
    void verifyOperationByCredentialSeparator() throws Throwable {
        val request = new MockHttpServletRequest();
        val requestBody = new LinkedMultiValueMap<String, String>();
        requestBody.add("username", "surrogate+test");
        requestBody.add("password", "password");

        val service = getSurrogateAuthenticationService(Map.of("test", List.of("surrogate")));
        val factory = new SurrogateAuthenticationRestHttpRequestCredentialFactory(service, casProperties.getAuthn().getSurrogate());
        val results = factory.fromRequest(request, requestBody);
        assertFalse(results.isEmpty());
        val credential = results.getFirst();
        assertNotNull(credential);
        assertEquals("surrogate", credential.getCredentialMetadata().getTrait(SurrogateCredentialTrait.class).get().getSurrogateUsername());
        assertEquals("test", credential.getId());
    }
This is {@link SurrogateAuthenticationRestHttpRequestCredentialFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-surrogate-authentication/src/test/java/org/apereo/cas/authentication/rest/SurrogateAuthenticationRestHttpRequestCredentialFactoryTests.java