@Test
    void verify() throws Throwable {
        val map = new HashMap<String, List<Object>>();
        map.put("cn", List.of("cas"));

        val principal = CoreAuthenticationTestUtils.getPrincipal(UUID.randomUUID().toString(), map);
        val authentication = RegisteredServiceTestUtils.getAuthentication(principal);
        val code = addCode(principal, getOidcRegisteredService());
        val accessToken = accessTokenFactory.create(RegisteredServiceTestUtils.getService(), authentication,
            new MockTicketGrantingTicket(principal.getId()), new ArrayList<>(),
            code.getId(), code.getClientId(), new HashMap<>(),
            OAuth20ResponseTypes.CODE, OAuth20GrantTypes.AUTHORIZATION_CODE);
        ticketRegistry.addTicket(accessToken.getTicketGrantingTicket());
        ticketRegistry.addTicket(accessToken);

        val mockRequest = getHttpRequestForEndpoint(OidcConstants.PROFILE_URL);
        mockRequest.setMethod(HttpMethod.GET.name());
        mockRequest.setParameter(OAuth20Constants.ACCESS_TOKEN, accessToken.getId());
        val mockResponse = new MockHttpServletResponse();

        var entity = oidcUserProfileEndpointController.handleGetRequest(mockRequest, mockResponse);
        assertEquals(HttpStatus.OK, entity.getStatusCode());

        entity = oidcUserProfileEndpointController.handlePostRequest(mockRequest, mockResponse);
        assertEquals(HttpStatus.OK, entity.getStatusCode());
    }
This is {@link OidcUserProfileEndpointControllerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/web/controllers/profile/OidcUserProfileEndpointControllerTests.java