public void testWithAccessToken()
throws Exception {
URI endpointURI = new URI("https://c2id.com/token/revoke");
Token token = new BearerAccessToken();
TokenRevocationRequest request = new TokenRevocationRequest(endpointURI, null, token);
assertEquals(endpointURI, request.getEndpointURI());
assertNull(request.getClientAuthentication());
assertEquals(token, request.getToken());
HTTPRequest httpRequest = request.toHTTPRequest();
assertEquals(HTTPRequest.Method.POST, httpRequest.getMethod());
assertEquals(endpointURI.toURL().toString(), httpRequest.getURL().toString());
assertEquals(CommonContentTypes.APPLICATION_URLENCODED, httpRequest.getContentType());
assertNull(httpRequest.getAuthorization());
assertEquals(token.getValue(), httpRequest.getQueryParameters().get("token"));
assertEquals("access_token", httpRequest.getQueryParameters().get("token_type_hint"));
assertEquals(2, httpRequest.getQueryParameters().size());
}