@Test
    void verifyOperation() throws Throwable {
        val clientId = addRegisteredService().getClientId();
        val holder = AccessTokenRequestContext.builder()
            .clientId(clientId)
            .service(CoreAuthenticationTestUtils.getService())
            .authentication(RegisteredServiceTestUtils.getAuthentication(CoreAuthenticationTestUtils.getPrincipal("casuser")))
            .registeredService(getRegisteredService(clientId, CLIENT_SECRET))
            .grantType(OAuth20GrantTypes.AUTHORIZATION_CODE)
            .responseType(OAuth20ResponseTypes.CODE)
            .ticketGrantingTicket(new MockTicketGrantingTicket("casuser"))
            .build();
        assertNotNull(oauthResourceOwnerCredentialsResponseBuilder.build(holder));
        val registeredService = OAuth20Utils.getRegisteredOAuthServiceByClientId(servicesManager, clientId);
        assertNotNull(oauthResourceOwnerCredentialsResponseBuilder.build(registeredService,
            OAuth20ResponseModeTypes.FORM_POST, "https://example.org", Map.of()));
    }
This is {@link OAuth20ResourceOwnerCredentialsResponseBuilderTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/response/callback/OAuth20ResourceOwnerCredentialsResponseBuilderTests.java