@Test
public void test_spew_root_document_on_filesystem() throws Exception {

    final Extractor extractor = new Extractor(factory);
    Path path = get(getClass().getResource("/documents/text/plain.txt").getPath());
    TikaDocument tikaDocument = extractor.extract(path);
    fileSpewer.writeDocument(tikaDocument, null, null, 0);
    String[] list = folder.getRoot().list();
    assertThat(list).isNotEmpty();
    assertThat(list).contains("home");
    assertThat(readAllLines(get(folder.getRoot().toPath().resolve(path.toString().substring(1)).toString() + ".json"), Charset.defaultCharset())).
            hasSize(8);
    assertThat(readAllLines(get(folder.getRoot().toPath().resolve(path.toString().substring(1)).toString() + ".txt"), Charset.defaultCharset())).
            contains("This is a test.");
}