### Question:
LocalDateConverter extends TemporalAccessConverter<LocalDate> { synchronized public LocalDate fromString(String string, String pattern) { return LocalDate.from(DateTimeFormatter.ofPattern(pattern).parse(string)); } LocalDateConverter(); synchronized LocalDate fromString(String string, String pattern); @Override synchronized LocalDate fromString(String string, ConverterContext context);  }### Answer:
@Test public void testFromString() throws Exception { Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("Jan 1, 2000")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("1/1/00")); Assert.assertEquals(LocalDate.of(2003, 1, 2), _converter.fromString("01/02/03")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("1/1/2000")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("January 1, 2000")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("Jan 01, 2000")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("January 01, 2000")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("2000-01-01")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("00-01-01")); Assert.assertEquals(LocalDate.of(2003, 2, 1), _converter.fromString("03-02-01")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("20000101")); Assert.assertEquals(LocalDate.of(2000, 1, 1), _converter.fromString("1-Jan-2000")); }