DateSourceImpl implements DateSource { @Override public Date currentDate() { return new Date(); }  @Override Date currentDate();  }
@Test public void testGetDate() { long milis = System.currentTimeMillis() - 1000; Date dt = new Date(milis); assertTrue(dt.before(impl.currentDate())); }