### Question:
JDKLocalDateDeserializer extends JsonDeserializer<LocalDate> { public static LocalDate parse(String s) { if (StringUtils.isNotBlank(s)) { try { return LocalDate.parse(s, DateTimeFormatter.ofPattern("yyyy-MM-dd")); } catch (DateTimeParseException ignored) { try { return LocalDateTime.ofInstant(Instant.parse(s), ZoneOffset.UTC).toLocalDate(); } catch (DateTimeParseException ignored2) { return LocalDateTime.parse(s, DateTimeFormatter.ISO_LOCAL_DATE_TIME).toLocalDate(); } } } else { return null; } }  @Override LocalDate deserialize(JsonParser jp, DeserializationContext ctxt); static LocalDate parse(String s);  }### Answer:
@Test public void null_string() { assertNull(JDKLocalDateDeserializer.parse(null)); }
@Test public void blank_string() { assertNull(JDKLocalDateDeserializer.parse("")); }
@Test public void date_only() { assertEquals( LocalDate.of(2014, 7, 14), JDKLocalDateDeserializer.parse("2014-07-14") ); }
@Test public void date_time_zone() { assertEquals( LocalDate.of(2014, 7, 14), JDKLocalDateDeserializer.parse("2014-07-14T22:00:00.000Z") ); }
@Test public void date_time() { assertEquals( LocalDate.of(2014, 7, 14), JDKLocalDateDeserializer.parse("2014-07-14T22:00:00.000") ); }