@Test
public void test() throws MetExtractionException {

    TikaAutoDetectExtractor tikaExtractor = new TikaAutoDetectExtractor();
    Metadata emptyMetadata = new Metadata();
    Reference ref = new Reference();
    URL file = this.getClass().getResource("/test.txt");
    ref.setOrigReference(file.toString());
    ref.setDataStoreReference(file.toString());
    Product product = new Product();
    product.getProductReferences().add(ref);
    product.setProductStructure(Product.STRUCTURE_FLAT);
    Metadata outputMetadata = tikaExtractor.doExtract(product, emptyMetadata);
    assertNotNull(outputMetadata);
    assertTrue(outputMetadata.getAllKeys().size() > 0);
    assertTrue(outputMetadata.containsKey("X-Parsed-By"));
    assertFalse(outputMetadata.getMetadata("X-Parsed-By").equals("org.apache.tika.parser.EmptyParser"));
}