### Question:
PublicV3PingGetResponse { @JsonProperty("api_time") public Date getApiTime() { return apiTime; } @JsonCreator  PublicV3PingGetResponse(@JsonProperty(value = "api_time", required = true) Date apiTime); @JsonProperty("api_time") Date getApiTime();  }### Answer:
@Test public void jsonParseWSetsExpectedTimeValue() throws Exception { Date expected = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX").parse("2017-11-03T20:50:43Z"); Date actual = new ObjectMapper().readValue( "{\"api_time\": \"2017-11-03T20:50:43Z\"}", PublicV3PingGetResponse.class ).getApiTime(); assertEquals(expected, actual); }
@Test public void testApiTimeGetterReturnsValueFromConstructor() throws Exception { assertEquals( new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX").parse("2010-01-01T00:00:00Z"), publicPingGetResponse.getApiTime() ); }