### Question:
DataService implements FileURLHandler { public static String getDataDir() { String dataDir = System.getProperty(DATA_DIR); if(dataDir==null) { dataDir = getDefaultDataDir(); System.setProperty(DATA_DIR, dataDir); } return dataDir; } DataService(final String... roots);  DataService(final int port, final String... roots); static DataService getPlatformDataService(); DataService start(); URL getDataURL(final String path); URL getDataURL(final File file); URL getDataURL(final File file, final boolean verify); void download(final URL url, final File to); File getDataFile(final URL url); void stop(); static String getDataDir(); static String getRoots(int port); String getDataUrl(); String getDir(); static final String DATA_DIR; static final String DATA_URL; }### Answer:
@Test public void testGetDataDir() { String tmpDir = System.getenv("TMPDIR")==null?System.getProperty("java.io.tmpdir"):System.getenv("TMPDIR"); String dataDirName = new File(String.format(String.format("%s%ssorcer-%s%sdata", tmpDir, File.separator, System.getProperty("user.name"), File.separator))).getAbsolutePath(); System.err.println("===> "+dataDirName); assertTrue(dataDirName.equals(DataService.getDataDir())); }