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 noPathsFileLocationOkNoChecksRequired() throws IOException {
        pathChecker = new AllowedAuxiliaryPathChecker(new TreeSet<>(Collections.emptySet()));
        assertTrue(pathChecker.fileIsInAllowedPath(permittedTempDir.newFile(FILE).toPath()));
    }