}
}
+ @Test
+ public void testError200()
+ {
+ log.info("testError200");
+
+ requestFactory.setBody("{\n" +
+ " \"error\": {\n" +
+ " \"message\": \"(#200) The user hasn't authorized the application to perform this action\",\n" +
+ " \"type\": \"OAuthException\",\n" +
+ " \"code\": 200\n" +
+ " }\n" +
+ "}");
+
+ try
+ {
+ clientTemplate.getForObject("ANY", SOME.class);
+ fail("The expected exception was not thrown");
+ }
+ catch(ApplicationNotAuthorizedByUserException e)
+ {
+ log.debug("{}", e.toString());
+ assertEquals(new Integer(200), e.getCode());
+ assertEquals("(#200) The user hasn't authorized the application to perform this action", e.getMessage());
+ assertEquals(Type.OAuthException, e.getType());
+ assertNull(e.getTraceId());
+ }
+ }
+
@Test
public void testError613()
{