@Test
public void testGetCurrentJavaDateTime() {

    DateTimeService dateTimeService = new DateTimeService();
    DateTime systemDateTime = new DateTime(System.currentTimeMillis());
    DateTime timeServiceDateTime = new DateTime(dateTimeService.getCurrentJavaDateTime());
    Duration duration = new Duration(systemDateTime,timeServiceDateTime);
    // the dates returned should be equal or very close
    Assert.assertTrue("Expected the java date time returned by DateTimeService to be equal or close to the actual system time", duration.getMillis() < ONE_SECOND);
}