@Test
public void testsearchForRelated() throws Exception {

    KeywordsSearcher searcher = new KeywordsSearcher(isoLangMapper, thesaurusFinder);
    // tests narrower
    searcher.searchForRelated(THESAURUS_KEYWORD_NS + 20, thesaurus.getKey(), KeywordRelation.BROADER, null, "eng", "fre");
    assertEquals(1, searcher.getNbResults());
    assertEquals("" + 15, searcher.getResults().get(0).getRelativeCode());
    assertTrue(searcher.getResults().get(0).getValues().keySet().contains("eng"));
    assertTrue(searcher.getResults().get(0).getValues().keySet().contains("fre"));
    assertEquals(2, searcher.getResults().get(0).getValues().size());
    // tests broader
    searcher.searchForRelated(THESAURUS_KEYWORD_NS + 15, thesaurus.getKey(), KeywordRelation.NARROWER, null, "eng", "ger");
    assertEquals(1, searcher.getNbResults());
    assertEquals("" + 20, searcher.getResults().get(0).getRelativeCode());
    assertTrue(searcher.getResults().get(0).getValues().keySet().contains("eng"));
    assertTrue(searcher.getResults().get(0).getValues().keySet().contains("ger"));
    assertEquals(2, searcher.getResults().get(0).getValues().size());
    // tests related
    searcher.searchForRelated(THESAURUS_KEYWORD_NS + 25, thesaurus.getKey(), KeywordRelation.RELATED, null, "eng");
    assertEquals(1, searcher.getNbResults());
    assertEquals("" + 22, searcher.getResults().get(0).getRelativeCode());
    assertTrue(searcher.getResults().get(0).getValues().keySet().contains("eng"));
    assertEquals(1, searcher.getResults().get(0).getValues().size());
}