@Test public void requestTermReturnsNullIfResultsAreEmpty() { when(this.termList.isEmpty()).thenReturn(true); Assert.assertNull(this.component.requestTerm(QUERY_STRING, null)); }
private VocabularyTerm requestTerm(final String id) { final String queryStr = String.format("%2$s:%1$s^50 %3$s:%1$s %4$s:HGNC\\:%1$s", id, SYMBOL_FIELD_NAME, ALTERNATIVE_ID_FIELD_NAME, ID_FIELD_NAME); return requestTerm(queryStr, null); }
GeneNomenclature extends AbstractCSVSolrVocabulary { private VocabularyTerm requestTerm(final String id) { final String queryStr = String.format("%2$s:%1$s^50 %3$s:%1$s %4$s:HGNC\\:%1$s", id, SYMBOL_FIELD_NAME, ALTERNATIVE_ID_FIELD_NAME, ID_FIELD_NAME); return requestTerm(queryStr, null); } }
GeneNomenclature extends AbstractCSVSolrVocabulary { private VocabularyTerm requestTerm(final String id) { final String queryStr = String.format("%2$s:%1$s^50 %3$s:%1$s %4$s:HGNC\\:%1$s", id, SYMBOL_FIELD_NAME, ALTERNATIVE_ID_FIELD_NAME, ID_FIELD_NAME); return requestTerm(queryStr, null); }  }
GeneNomenclature extends AbstractCSVSolrVocabulary { private VocabularyTerm requestTerm(final String id) { final String queryStr = String.format("%2$s:%1$s^50 %3$s:%1$s %4$s:HGNC\\:%1$s", id, SYMBOL_FIELD_NAME, ALTERNATIVE_ID_FIELD_NAME, ID_FIELD_NAME); return requestTerm(queryStr, null); }  @Override String getDefaultSourceLocation(); @Override String getIdentifier(); @Override String getName(); @Override Collection<String> getSupportedCategories(); @Override Set<String> getAliases(); @Override String getWebsite(); @Override String getCitation(); @Override VocabularyTerm getTerm(String symbol); @Override List<VocabularyTerm> search(String input, int maxResults, String sort, String customFilter); @Override Set<VocabularyTerm> getTerms(Collection<String> symbols); @Override long getDistance(String fromTermId, String toTermId); @Override long getDistance(VocabularyTerm fromTerm, VocabularyTerm toTerm); }
GeneNomenclature extends AbstractCSVSolrVocabulary { private VocabularyTerm requestTerm(final String id) { final String queryStr = String.format("%2$s:%1$s^50 %3$s:%1$s %4$s:HGNC\\:%1$s", id, SYMBOL_FIELD_NAME, ALTERNATIVE_ID_FIELD_NAME, ID_FIELD_NAME); return requestTerm(queryStr, null); }  @Override String getDefaultSourceLocation(); @Override String getIdentifier(); @Override String getName(); @Override Collection<String> getSupportedCategories(); @Override Set<String> getAliases(); @Override String getWebsite(); @Override String getCitation(); @Override VocabularyTerm getTerm(String symbol); @Override List<VocabularyTerm> search(String input, int maxResults, String sort, String customFilter); @Override Set<VocabularyTerm> getTerms(Collection<String> symbols); @Override long getDistance(String fromTermId, String toTermId); @Override long getDistance(VocabularyTerm fromTerm, VocabularyTerm toTerm);  }