@Test
public void testBuildOfJacksonWithInvalidPropertyName() throws Exception {

    String badDocument = "{\"myType\":\"myServiceType\"}";
    List<ErrorResponses.StackTraceRepresentation> mappedError = null;
    try {
        mapper.readValue(badDocument, MyService.class);
        fail("Expected parsing exception");
    } catch (PropertyBindingException e) {
        mappedError = ErrorResponses.buildExceptionContext(e);
    }
    ErrorResponses.StackTraceRepresentation stackTrace = mappedError.get(0);
    assertThat(stackTrace.getDetails(), is(notNullValue()));
    assertThat(stackTrace.getDetails().get("property"), is(equalTo("myType")));
}