public List<Path> getAllTestFiles() {
        //for now, just get main files
        //TODO: fix this to be recursive
        try {
            File[] pathArray = Paths.get(getResourceAsUri("/test-documents")).toFile().listFiles();
            List<Path> paths = new ArrayList<>();
            for (File f : pathArray) {
                paths.add(f.toPath());
            }
            return paths;
        } catch (URISyntaxException e) {
            throw new RuntimeException(e);
        }
    }
Basic text extraction.
<p>
Tries to close input stream after processing.
tika-core/src/test/java/org/apache/tika/TikaTest.java