@Test public void testNewDate() { StubDateFactory factory = new StubDateFactory(); Date now = factory.newDate(); 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(23)); assertThat(result.getMinuteOfHour(), is(7)); assertThat(result.getSecondOfMinute(), is(11)); assertThat(result.getMillisOfSecond(), is(100)); }
@Override public Date newDate() { return newDateTime().toDate(); }
AbstractJodaTimeDateFactory extends
                                                  DefaultClassicDateFactory implements
                                                  JodaTimeDateFactory { @Override public Date newDate() { return newDateTime().toDate(); } }
AbstractJodaTimeDateFactory extends
                                                  DefaultClassicDateFactory implements
                                                  JodaTimeDateFactory { @Override public Date newDate() { return newDateTime().toDate(); }  }
AbstractJodaTimeDateFactory extends
                                                  DefaultClassicDateFactory implements
                                                  JodaTimeDateFactory { @Override public Date newDate() { return newDateTime().toDate(); }  @Override Date newDate(); }
AbstractJodaTimeDateFactory extends
                                                  DefaultClassicDateFactory implements
                                                  JodaTimeDateFactory { @Override public Date newDate() { return newDateTime().toDate(); }  @Override Date newDate();  }