### Question:
Error { public Object getErrorData() { return errorData; } @JsonCreator  Error(
            @JsonProperty(value = "error_code") String errorCode,
            @JsonProperty(value = "error_detail") Object errorDetail,
            @JsonProperty(value = "error_data") Object errorData
    ); String getErrorCode(); Object getErrorDetail(); Object getErrorData();  }### Answer:
@Test public void getErrorData() { assertSame(errorData, error.getErrorData()); }
@Test public void objectMapperPopulatesErrorData() throws Exception { String json = "{" + "\"error_code\": \"SVC-005\"," + "\"error_detail\": \"An auth already exists.\"," + "\"error_data\": {" + "\"auth_request\": \"adc0d351-d8a8-11e8-9fe8-acde48001122\"," + "\"my_auth\": true," + "\"expires\": \"2018-11-28T22:04:44Z\"" + "}" + "}"; Error error = mapper.readValue(json, Error.class); Map<Object, Object> data = (Map<Object, Object>) error.getErrorData(); assertEquals("adc0d351-d8a8-11e8-9fe8-acde48001122", data.get("auth_request")); assertEquals(true, data.get("my_auth")); assertEquals("2018-11-28T22:04:44Z", data.get("expires")); }