WorkingDirectory { public static File getWorkingDirectory() { String userHome = System.getProperty("user.home", "."); File workingDirectory; switch (getPlatform()) { case LINUX: case SOLARIS: workingDirectory = new File(userHome, '.' + applicationName + '/'); break; case WINDOWS: String applicationData = System.getenv("APPDATA"); if (applicationData != null) { workingDirectory = new File(applicationData, applicationName + '/'); } else { workingDirectory = new File(userHome, '.' + applicationName + '/'); } break; case MAC: workingDirectory = new File(userHome, "Library/Application Support/" + applicationName); break; case ANDROID: workingDirectory = new File(System.getenv("EXTERNAL_STORAGE"), applicationName + '/'); break; default: workingDirectory = new File(userHome, applicationName + '/'); } if ((!workingDirectory.exists()) && (!workingDirectory.mkdirs())) { throw new RuntimeException("The working directory could not be created: " + workingDirectory); } return workingDirectory; }  static void setApplicationName(String applicationName); static File getWorkingDirectory(); static OS getPlatform(); static File getMapsFolder(); static boolean unpackMap(String foldername, InputStream source); static boolean delete(); static boolean deleteDirectory(File directory);  }
@Test public void testGetWorkingDirectory() { System.out.println("getWorkingDirectory"); File expResult = null; File result = WorkingDirectory.getWorkingDirectory(); assertTrue(result.isDirectory()); }