@Test
public void testNerChain() throws Exception {

    String classNames = OpenNLPNERecogniser.class.getName() + "," + RegexNERecogniser.class.getName();
    System.setProperty(NamedEntityParser.SYS_PROP_NER_IMPL, classNames);
    try (InputStream is = getClass().getResourceAsStream(CONFIG_FILE)) {
        TikaConfig config = new TikaConfig(is);
        Tika tika = new Tika(config);
        String text = "University of Southern California (USC), is located in Los Angeles ." +
                " Campus is busy from monday to saturday";
        Metadata md = new Metadata();
        tika.parse(new ByteArrayInputStream(text.getBytes(Charset.defaultCharset())), md);
        HashSet<String> keys = new HashSet<>(Arrays.asList(md.names()));
        assumeTrue(keys.contains("NER_WEEK_DAY"));
        assumeTrue(keys.contains("NER_LOCATION"));
    }
}