}
@Test
public void testExceptionDeserialization() throws Exception {
String exception = "{\"error\": \"invalid_client\", \"error_description\": \"FOO\", \"foo\": \"bar\"}";
OAuth2Exception result = new ObjectMapper().readValue(exception, OAuth2Exception.class);
// System.err.println(result);
assertEquals("FOO", result.getMessage());
assertEquals("invalid_client", result.getOAuth2ErrorCode());
assertEquals("{foo=bar}", result.getAdditionalInformation().toString());
assertTrue(result instanceof InvalidClientException);
}