Thesaurus { public boolean hasKeyword(String uri) { try { getKeyword(uri); } catch (TermNotFoundException e) { return false; } return true; } protected  Thesaurus();  Thesaurus(IsoLanguagesMapper isoLanguageMapper, String fname, String type, String dname, Path thesaurusFile, String siteUrl);  Thesaurus(IsoLanguagesMapper isoLanguageMapper, String fname, String tname, String tnamespace, String type, String dname, Path thesaurusFile, String siteUrl, boolean ignoreMissingError); static String buildThesaurusKey(String fname, String type, String dname); Map<String, String> getMultilingualTitles(); Map<String,Map<String, String>> getDublinCoreMultilingual(); String getKey(); String getDname(); String getFname(); Path getFile(); String getType(); String getTitle(); String getDate(); @Nonnull FileTime getLastModifiedTime(); String getDownloadUrl(); String getKeywordUrl(); void retrieveThesaurusTitle(); synchronized LocalRepository getRepository(); synchronized Thesaurus setRepository(LocalRepository repository); synchronized Thesaurus initRepository(); synchronized QueryResultsTable performRequest(String query); boolean hasConceptScheme(String uri); List<String> getConceptSchemes(); synchronized URI addElement(KeywordBean keyword); synchronized Thesaurus removeElement(KeywordBean keyword); synchronized Thesaurus removeElement(String namespace, String code); synchronized Thesaurus removeElement(String uri); synchronized URI updateElement(KeywordBean keyword, boolean replace); synchronized boolean isFreeCode(String namespace, String code); Thesaurus updateCode(KeywordBean bean, String newcode); synchronized Thesaurus updateCode(String namespace, String oldcode, String newcode); synchronized Thesaurus updateCodeByURI(String olduri, String newuri); void addTitleElement(String thesaurusTitle); IsoLanguagesMapper getIsoLanguageMapper(); synchronized void addRelation(String subject, KeywordRelation related, String relatedSubject); KeywordBean getKeyword(String uri, String... languages); List<KeywordBean> getTopConcepts(String... languages); boolean hasKeyword(String uri); List<KeywordBean> getBroader(String uri, String... languages); boolean hasBroader(String uri); List<KeywordBean> getRelated(String uri, KeywordRelation request, String... languages); boolean hasKeywordWithLabel(String label, String langCode); KeywordBean getKeywordWithLabel(String label, String langCode); synchronized void clear(); String getDefaultNamespace(); Map<String, String> getTitles(ApplicationContext context);  }
@Test public void testHasKeyword() throws Exception { addKeywordToWritableThesaurus(TEST_KEYWORD); boolean result = writableThesaurus.hasKeyword(TEST_KEYWORD); assertTrue(result); }
@Test public void testDoesntHavekeyword() throws Exception { boolean result = writableThesaurus.hasKeyword("http: assertFalse(result); }