@Test
public void testGetEntityTypes() throws Exception {

    String text = "Hey, Lets meet on this Sunday or MONDAY because i am busy on Saturday";
    System.setProperty(NamedEntityParser.SYS_PROP_NER_IMPL, RegexNERecogniser.class.getName());
    Tika tika = new Tika(new TikaConfig(NamedEntityParser.class.getResourceAsStream("tika-config.xml")));
    Metadata md = new Metadata();
    tika.parse(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)), md);
    Set<String> days = new HashSet<>(Arrays.asList(md.getValues("NER_WEEK_DAY")));
    assertTrue(days.contains("Sunday"));
    assertTrue(days.contains("MONDAY"));
    assertTrue(days.contains("Saturday"));
    assertTrue(days.size() == 3); //and nothing else
}