SynonymGenerationTools implements TermGenieScriptFunctionsSynonyms { @Override public List<ISynonym> addSynonym(String label, List<ISynonym> results, String prefix, String infix, String suffix, String scope) { StringBuilder sb = new StringBuilder(); if (prefix != null) { sb.append(prefix); } sb.append(infix); if (suffix != null) { sb.append(suffix); } return addSynonym(results, scope, sb.toString(), label); } SynonymGenerationTools(boolean filterNonAsciiSynonyms); @Override List<ISynonym> synonyms(String prefix,
			OWLObject x,
			OWLGraphWrapper ontology,
			String suffix,
			String defaultScope,
			String label); @Override List<ISynonym> synonyms(String[] prefixes,
			String[] scopes,
			OWLObject x,
			OWLGraphWrapper ontology,
			String[] suffixes,
			String label); @Override List<ISynonym> addSynonym(String label,
			List<ISynonym> results,
			String prefix,
			String infix,
			String suffix,
			String scope); @Override List<ISynonym> synonyms(String prefix,
			OWLObject x1,
			OWLGraphWrapper ontology1,
			String infix,
			OWLObject x2,
			OWLGraphWrapper ontology2,
			String suffix,
			String defaultScope,
			String label); @Override List<ISynonym> synonyms(String prefix,
			OWLObject x1,
			OWLGraphWrapper ontology1,
			String infix,
			OWLObject x2,
			OWLGraphWrapper ontology2,
			String suffix,
			String defaultScope,
			String label,
			String requiredPrefixLeft,
			boolean ignoreSynonymsRight); @Override List<ISynonym> synonyms(String prefix,
			OWLObject[] terms,
			String[] defaultScopes,
			OWLGraphWrapper ontology,
			String infix,
			String suffix,
			String label); @Override void setSynonymFilters(boolean requireCategories,
			boolean removeCategories,
			String[] categories); @Override void resetSynonymFilters();  }
@Test public void testAddSynonym() throws Exception { List<ISynonym> results = new ArrayList<ISynonym>(); results.add(new Synonym("single", "scope", null, Collections.<String>emptySet())); results.add(new Synonym("redundant", "scope", null, Collections.<String>emptySet())); results.add(new Synonym("redundant", "scope", null, Collections.<String>emptySet())); SynonymGenerationTools.addSynonym(results , "scope", "redundant", "label"); assertEquals(2, results.size()); }