}
}
+ @Test
+ public void testError12()
+ {
+ log.info("testError12");
+
+
+ requestFactory.setBody(
+ "{\n" +
+ " \"error\":\n" +
+ " {\n" +
+ " \"message\": \"(#12) location field is deprecated for versions v2.5 and higher\",\n" +
+ " \"type\": \"OAuthException\",\n" +
+ " \"code\": 12\n," +
+ " \"fbtrace_id\":\"BoxCYne7GrL\"\n" +
+ " }\n" +
+ "}");
+
+ try
+ {
+ clientTemplate.getForObject("ANY", SOME.class);
+ fail("The expected exception was not thrown");
+ }
+ catch(DeprecatedException e)
+ {
+ log.debug("{}", e.toString());
+ assertEquals(new Integer(12), e.getCode());
+ assertEquals("(#12) location field is deprecated for versions v2.5 and higher", e.getMessage());
+ assertEquals(Type.OAuthException, e.getType());
+ }
+ }
+
@Test
public void testError21()
{