### Question:
LocalDateConverter implements Converter<String, LocalDate> { @Override public LocalDate convert(String source) { return convert(source, DateTimeFormatter.ISO_DATE); }  @Override LocalDate convert(String source); LocalDate convert(String source, DateTimeFormatter formatter);  }### Answer:
@Test void convert_withCorrectString_shouldReturnObject() { LocalDate actualResult = localDateConverter.convert(ISO_DATE_STRING); assertEquals(EXPECTED_LOCAL_DATE, actualResult); }
@Test void convert_withMalformedString_shouldThrowDateTimeParseException() { assertThrows(DateTimeParseException.class, () -> localDateConverter.convert(MALFORMED_STRING)); }
@Test void convert_DateTimeFormatter() { LocalDate convertedDate = localDateConverter.convert("2020-04-02", DateTimeFormatter.ISO_LOCAL_DATE); assertEquals(EXPECTED_LOCAL_DATE, convertedDate); convertedDate = localDateConverter.convert("20200402", DateTimeFormatter.BASIC_ISO_DATE); assertEquals(EXPECTED_LOCAL_DATE, convertedDate); }