public void testCheckToken() throws Exception {
OAuth2AccessToken token = context.getAccessToken();
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", MediaType.APPLICATION_FORM_URLENCODED_VALUE);
@SuppressWarnings("rawtypes")
ResponseEntity<Map> response = new TestRestTemplate("my-client-with-secret", "secret").exchange(http
.getUrl(checkTokenPath()), HttpMethod.POST,
new HttpEntity<String>("token=" + token.getValue(), headers), Map.class);
assertEquals(HttpStatus.OK, response.getStatusCode());
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) response.getBody();