DefaultClassicDateFactory implements ClassicDateFactory { @Override public java.sql.Date newSqlDate() { Date now = newDate(); return DateConvertUtils.convertToSqlDate(now); }  @Override Date newDate(); @Override Timestamp newTimestamp(); @Override java.sql.Date newSqlDate(); @Override Time newTime();  }
@Test public void testNewSqlDate() { java.sql.Date now = factory.newSqlDate(); DateTime result = new DateTime(now.getTime()); assertThat(result.getYear(), is(2012)); assertThat(result.getMonthOfYear(), is(9)); assertThat(result.getDayOfMonth(), is(3)); assertThat(result.getHourOfDay(), is(0)); assertThat(result.getMinuteOfHour(), is(0)); assertThat(result.getSecondOfMinute(), is(0)); assertThat(result.getMillisOfSecond(), is(0)); }