@Test
public void testGetDateTime() {

    DateTime referenceDateTime = new DateTime(2008, 12, 5, 1, 10, 0, 0);
    DateTimeService dateTimeService = new DateTimeService();
    try {
        // set a fixed datetime which is what SystemInfo should get back
        dateTimeService.setCurrentDateTimeFixed(referenceDateTime);
        Assert.assertEquals("System info date time should be from the DateTimeService", referenceDateTime, info
                .getDateTime());
    } finally {
        dateTimeService.resetToCurrentSystemDateTime();
    }
}