@Test public void getSizeWithErrorReturnsNegative1() throws ComponentLookupException, URISyntaxException, ClientProtocolException, IOException { when(this.client.execute(any(HttpUriRequest.class))).thenThrow(new IOException()); long result = this.mocker.getComponentUnderTest().size(); Assert.assertEquals(-1, result); }
@Override public long size() { JSONObject info = getInfo(); return info == null ? -1 : info.getLong("numDoc"); }
RemoteGeneNomenclature implements Vocabulary, Initializable { @Override public long size() { JSONObject info = getInfo(); return info == null ? -1 : info.getLong("numDoc"); } }
RemoteGeneNomenclature implements Vocabulary, Initializable { @Override public long size() { JSONObject info = getInfo(); return info == null ? -1 : info.getLong("numDoc"); }  }
RemoteGeneNomenclature implements Vocabulary, Initializable { @Override public long size() { JSONObject info = getInfo(); return info == null ? -1 : info.getLong("numDoc"); }  @Override void initialize(); @Override VocabularyTerm getTerm(String id); @Override Set<VocabularyTerm> getTerms(Collection<String> ids); @Override List<VocabularyTerm> search(Map<String, ?> fieldValues); @Override List<VocabularyTerm> search(Map<String, ?> fieldValues, Map<String, String> queryOptions); @Override List<VocabularyTerm> search(String input); @Override List<VocabularyTerm> search(String input, int maxResults, String sort, String customFilter); @Override long count(Map<String, ?> fieldValues); @Override long getDistance(String fromTermId, String toTermId); @Override long getDistance(VocabularyTerm fromTerm, VocabularyTerm toTerm); @Override String getIdentifier(); @Override String getName(); @Override Set<String> getAliases(); @Override Collection<String> getSupportedCategories(); @Override String getWebsite(); @Override String getCitation(); @Override long size(); @Override int reindex(String ontologyUrl); @Override String getDefaultSourceLocation(); @Override String getVersion(); @Override List<VocabularyExtension> getExtensions(); }
RemoteGeneNomenclature implements Vocabulary, Initializable { @Override public long size() { JSONObject info = getInfo(); return info == null ? -1 : info.getLong("numDoc"); }  @Override void initialize(); @Override VocabularyTerm getTerm(String id); @Override Set<VocabularyTerm> getTerms(Collection<String> ids); @Override List<VocabularyTerm> search(Map<String, ?> fieldValues); @Override List<VocabularyTerm> search(Map<String, ?> fieldValues, Map<String, String> queryOptions); @Override List<VocabularyTerm> search(String input); @Override List<VocabularyTerm> search(String input, int maxResults, String sort, String customFilter); @Override long count(Map<String, ?> fieldValues); @Override long getDistance(String fromTermId, String toTermId); @Override long getDistance(VocabularyTerm fromTerm, VocabularyTerm toTerm); @Override String getIdentifier(); @Override String getName(); @Override Set<String> getAliases(); @Override Collection<String> getSupportedCategories(); @Override String getWebsite(); @Override String getCitation(); @Override long size(); @Override int reindex(String ontologyUrl); @Override String getDefaultSourceLocation(); @Override String getVersion(); @Override List<VocabularyExtension> getExtensions();  }