@Test
public void testReadLexicons() throws Exception {

  System.setProperty("config.file", "src/test/resources/testWithLex.conf");
  ConfigFactory.invalidateCaches();
  final Config config = ConfigFactory.load();
  final String sessionId = "test";
  PosTaggerLexicon lexicon = TalismaneSession.get(sessionId).getMergedLexicon();
  List<LexicalEntry> entries = lexicon.getEntries("dame");
  for (LexicalEntry entry : entries) {
    System.out.println(entry);
  }
  assertEquals(9, entries.size());
  PosTagSet posTagSet = TalismaneSession.get(sessionId).getPosTagSet();
  entries = lexicon.findLexicalEntries("dame", posTagSet.getPosTag("NC"));
  for (LexicalEntry entry : entries) {
    System.out.println(entry);
  }
  assertEquals(2, entries.size());
  Set<PosTag> posTags = lexicon.findPossiblePosTags("dame");
  System.out.println(posTags);
  assertEquals(4, posTags.size());
  System.clearProperty("config.file");
  ConfigFactory.invalidateCaches();
}