SystemInfo implements Serializable { public DateTime getDateTime() { return new DateTimeService().getCurrentDateTime(); } SystemInfo(DatabaseMetaData databaseMetaData, ServletContext context, Locale locale, boolean getInfoSource); String getApplicationVersion(); String getApplicationVersion(List<Integer> appliedUpgrades, List<Integer> releaseUpgrades,
            String releaseSchemaName); String getDatabaseVendor(); String getDatabaseVersion(); String getDriverName(); String getDriverVersion(); String getJavaVendor(); String getJavaVersion(); String getApplicationServerInfo(); void setApplicationServerInfo(String applicationServerInfo); String getCommitIdentifier(); String getBuildNumber(); String getBuildDate(); String getReleaseName(); void setJavaVendor(String javaVendor); void setJavaVersion(String javaVersion); void setBuildInformation(VersionInfo versionInfo); void setCustomReportsDir(String dir); String getCustomReportsDir(); String getOsName(); void setOsName(String osName); String getOsArch(); void setOsArch(String osArch); String getOsVersion(); void setOsVersion(String osVersion); String getInfoSource(); void setInfoSource(String infoSource); String getDatabaseServer(); String getDatabasePort(); String getDatabaseName(); String getDatabaseUser(); void setDatabaseUser(String databaseUser); String getInfoURL(); void setInfoURL(URI infoURL); DateTime getDateTime(); String getDateTimeString(); String getDateTimeStringIso8601(); String getOsUser(); void setOsUser(String osUser);  }
@Test public void testGetDateTime() { DateTime referenceDateTime = new DateTime(2008, 12, 5, 1, 10, 0, 0); DateTimeService dateTimeService = new DateTimeService(); try { dateTimeService.setCurrentDateTimeFixed(referenceDateTime); Assert.assertEquals("System info date time should be from the DateTimeService", referenceDateTime, info .getDateTime()); } finally { dateTimeService.resetToCurrentSystemDateTime(); } }