@Test
    void verifyGivenTokenNotInRegistry() throws Throwable {
        val registeredService = getRegisteredService(REDIRECT_URI, CLIENT_SECRET, new HashSet<>());
        servicesManager.save(registeredService);
        servicesManager.save(getRegisteredService(REDIRECT_URI, PUBLIC_CLIENT_ID, StringUtils.EMPTY, new HashSet<>()));

        val mockRequest = new MockHttpServletRequest(HttpMethod.POST.name(),
            CONTEXT + OAuth20Constants.REVOCATION_URL);
        val mockResponse = new MockHttpServletResponse();
        mockRequest.setParameter(OAuth20Constants.CLIENT_ID, registeredService.getClientId());
        mockRequest.setParameter(OAuth20Constants.CLIENT_SECRET, CLIENT_SECRET);
        mockRequest.setParameter(OAuth20Constants.TOKEN, "AT-1234");

        requiresAuthenticationInterceptor.preHandle(mockRequest, mockResponse, null);
        oAuth20RevocationController.handleRequest(mockRequest, mockResponse);
        assertEquals(HttpStatus.OK.value(), mockResponse.getStatus());

        mockRequest.removeAllParameters();
        mockRequest.setParameter(OAuth20Constants.CLIENT_ID, PUBLIC_CLIENT_ID);
        mockRequest.setParameter(OAuth20Constants.TOKEN, "AT-1234");

        oAuth20RevocationController.handleRequest(mockRequest, mockResponse);
        assertEquals(HttpStatus.OK.value(), mockResponse.getStatus());
    }
This class tests the {@link OAuth20RevocationEndpointController} class.

@author Julien Huon
@since 6.2.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20RevocationEndpointControllerTests.java