@Test public void testNewDateTime() { JodaTimeDateFactory factory = new DefaultJodaTimeDateFactory(); long currentTimeMillis = System.currentTimeMillis(); DateTimeUtils.setCurrentMillisFixed(currentTimeMillis); try { DateTime result = factory.newDateTime(); assertThat(result.getMillis(), is(currentTimeMillis)); } finally { DateTimeUtils.setCurrentMillisSystem(); } }
@Override public DateTime newDateTime() { return new DateTime(); }
DefaultJodaTimeDateFactory extends AbstractJodaTimeDateFactory { @Override public DateTime newDateTime() { return new DateTime(); } }
DefaultJodaTimeDateFactory extends AbstractJodaTimeDateFactory { @Override public DateTime newDateTime() { return new DateTime(); }  }
DefaultJodaTimeDateFactory extends AbstractJodaTimeDateFactory { @Override public DateTime newDateTime() { return new DateTime(); }  @Override DateTime newDateTime(); }
DefaultJodaTimeDateFactory extends AbstractJodaTimeDateFactory { @Override public DateTime newDateTime() { return new DateTime(); }  @Override DateTime newDateTime();  }