@Test
public void testParseYearMonthDay() {

  String toParse = "2010-02-22";
  LocalDate localDate = DateUtil.parseLocalDate(toParse);
  assertNotNull("Error parsing yyyy-MM-dd", localDate);
  assertEquals(2010, localDate.getYear());
  assertEquals(2, localDate.getMonthOfYear());
  assertEquals(22, localDate.getDayOfMonth());
  assertNull("Error parsing yyyy-MM-dd", DateUtil.parseLocalDate("invalid date"));
}