public boolean fileIsInAllowedPath(Path path) {
        if (allowedPaths.isEmpty()) {
            return true;
        }

        final Path realFilePath = resolveRealPath(path);
        if (realFilePath == null) {
            return false;
        }
        for (Path allowedPath : allowedPaths) {
            final Path realAllowedPath = resolveRealPath(allowedPath);
            if (realAllowedPath != null && realFilePath.startsWith(realAllowedPath)) {
                return true;
            }
        }
        return false;
    }
@Test
    public void permittedPathDoesNotExist() throws IOException {
        final Path permittedPath = Paths.get("non-existent-file-path");
        final Path filePath = permittedTempDir.newFile(FILE).toPath();

        pathChecker = new AllowedAuxiliaryPathChecker(new TreeSet<>(Collections.singleton(permittedPath)));
        assertFalse(pathChecker.fileIsInAllowedPath(filePath));
    }