public static Path get(String appName) {
        final Path applicationDataDirectory = getPath(appName);

        try {
            Files.createDirectories(applicationDataDirectory);
        } catch (IOException ioe) {
            throw new RuntimeException("Couldn't find/create AppDataDirectory", ioe);
        }

        return applicationDataDirectory;
    }
@Test(expected = RuntimeException.class)
    public void throwsIOExceptionIfPathNotFound() {
        // Force exceptions with illegal characters
        if (PlatformUtils.isWindows()) {
            AppDataDirectory.get(":");  // Illegal character for Windows
        }
        if (PlatformUtils.isMac()) {
            // NUL character
            AppDataDirectory.get("\0"); // Illegal character for Mac
        }
        if (PlatformUtils.isLinux()) {
            // NUL character
            AppDataDirectory.get("\0"); // Illegal character for Linux
        }
    }