@Test
    void verifyAuthenticationPlainWithSecretTransmittedByFormAuthn() throws Throwable {
        val credentials = new UsernamePasswordCredentials("client", "ABCD123");
        val request = new MockHttpServletRequest();
        val id = "CODE-%s".formatted(RandomUtils.randomAlphabetic(12));
        ticketRegistry.addTicket(
            new OAuth20DefaultCode(id, RegisteredServiceTestUtils.getService(), RegisteredServiceTestUtils.getAuthentication(),
                new HardTimeoutExpirationPolicy(10),
                new MockTicketGrantingTicket("casuser"),
                new ArrayList<>(), "ABCD123",
                "plain", "clientid12345", new HashMap<>(),
                OAuth20ResponseTypes.CODE, OAuth20GrantTypes.AUTHORIZATION_CODE));
        request.addParameter(OAuth20Constants.CLIENT_ID, "client");
        request.addParameter(OAuth20Constants.CODE_VERIFIER, "ABCD123");
        request.addParameter(OAuth20Constants.CLIENT_SECRET, "secret");
        request.addParameter(OAuth20Constants.CODE, id);
        val ctx = new JEEContext(request, new MockHttpServletResponse());
        authenticator.validate(new CallContext(ctx, new JEESessionStore()), credentials);
        assertNotNull(credentials.getUserProfile());
        assertEquals("client", credentials.getUserProfile().getId());
    }
This is {@link OAuth20ProofKeyCodeExchangeAuthenticatorTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/authenticator/OAuth20ProofKeyCodeExchangeAuthenticatorTests.java