### Question:
PDTFromString { @Nullable public static LocalDate getLocalDateFromString (@Nullable final String sValue, @Nullable final Locale aParseLocale) { return getLocalDateFromString (sValue, PDTFormatter.getFormatterDate (PDTFormatter.DEFAULT_STYLE, aParseLocale, EDTFormatterMode.PARSE)); } private  PDTFromString(); @Nullable static ZonedDateTime getZonedDateTimeFromString(@Nullable final String sValue, @Nonnull final String sPattern); @Nullable static ZonedDateTime getZonedDateTimeFromString(@Nullable final String sValue, @Nonnull final DateTimeFormatter aDF); @Nullable static LocalDate getLocalDateFromString(@Nullable final String sValue, @Nullable final Locale aParseLocale); @Nullable static LocalDate getLocalDateFromString(@Nullable final String sValue, @Nonnull final DateTimeFormatter aDF); @Nullable static LocalDate getLocalDateFromString(@Nullable final String sValue, @Nonnull final String sPattern); @Nullable static LocalDateTime getLocalDateTimeFromString(@Nullable final String sValue, @Nullable final Locale aParseLocale); @Nullable static LocalDateTime getLocalDateTimeFromString(@Nullable final String sValue, @Nonnull final DateTimeFormatter aDF); @Nullable static LocalDateTime getLocalDateTimeFromString(@Nullable final String sValue, @Nonnull final String sPattern); @Nullable static LocalTime getLocalTimeFromString(@Nullable final String sValue, @Nullable final Locale aParseLocale); @Nullable static LocalTime getLocalTimeFromString(@Nullable final String sValue, @Nonnull final DateTimeFormatter aDF); @Nullable static LocalTime getLocalTimeFromString(@Nullable final String sValue, @Nonnull final String sPattern); @Nullable static Duration getDurationFromString(@Nullable final String sValue); @Nullable static Period getPeriodFromString(@Nullable final String sValue);  }### Answer:
@Test public void testLocalDateFromString () { assertEquals (LocalDate.of (2000, Month.JULY, 6), PDTFromString.getLocalDateFromString ("2000.07.06", "uuuu.MM.dd")); assertNull (PDTFromString.getLocalDateFromString ("2000.07.06 abc", "uuuu.MM.dd")); assertNull (PDTFromString.getLocalDateFromString (null, "uuuu.MM.dd")); assertNull (PDTFromString.getLocalDateFromString ("2000.02.30", "uuuu.MM.dd")); assertEquals (LocalDate.of (2038, Month.JANUARY, 20), PDTFromString.getLocalDateFromString ("20.01.2038", Locale.GERMANY)); assertEquals (LocalDate.of (2038, Month.JANUARY, 20), PDTFromString.getLocalDateFromString ("20.01.2038", PDTFormatter.getFormatterDate (PDTFormatter.DEFAULT_STYLE, Locale.GERMANY, EDTFormatterMode.PARSE))); assertEquals (LocalDate.of (2938, Month.JANUARY, 20), PDTFromString.getLocalDateFromString ("20.01.2938", Locale.GERMANY)); try { PDTFromString.getLocalDateFromString ("2000.07.06", "abc"); fail (); } catch (final IllegalArgumentException ex) {} try { PDTFromString.getLocalDateFromString ("2000.07.06", (DateTimeFormatter) null); fail (); } catch (final NullPointerException ex) {} }