@Test public void getContextsForTermTest() throws ApiException { int count = 5; when( termApi.getContextsForTerm(eq(TERM), isNull(Boolean.class), eq(NOT_NULL_RETINA), isNull(Integer.class), isNull(Integer.class))).thenReturn(createContexts(count)); List<Context> contexts = termRetinaApiImpl.getContexts(TERM); assertEquals(count, contexts.size()); verify(termApi, times(1)).getContextsForTerm(eq(TERM), isNull(Boolean.class), eq(NOT_NULL_RETINA), isNull(Integer.class), isNull(Integer.class)); }
@Override public List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); LOG.debug("Retrieve contexts for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getContextsForTerm(term, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); }
TermsRetinaApiImpl extends BaseRetinaApi implements Terms { @Override public List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); LOG.debug("Retrieve contexts for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getContextsForTerm(term, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } }
TermsRetinaApiImpl extends BaseRetinaApi implements Terms { @Override public List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); LOG.debug("Retrieve contexts for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getContextsForTerm(term, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } TermsRetinaApiImpl(String apiKey, String basePath, String retinaName);   TermsRetinaApiImpl(TermsApi api, String retinaName); }
TermsRetinaApiImpl extends BaseRetinaApi implements Terms { @Override public List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); LOG.debug("Retrieve contexts for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getContextsForTerm(term, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } TermsRetinaApiImpl(String apiKey, String basePath, String retinaName);   TermsRetinaApiImpl(TermsApi api, String retinaName); @Override List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint); @Override List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination,
            Boolean includeFingerprint); @Override List<Term> getTerm(String term, Pagination pagination, Boolean includeFingerprint); @Override List<Context> getContexts(String term, Boolean includeFingerprint); @Override List<Context> getContexts(String term); @Override List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Boolean includeFingerprint); @Override List<Term> getSimilarTerms(String term, Integer contextId, PosType posType); @Override List<Term> getTerm(String term, Boolean includeFingerprint); @Override List<Term> getTerm(String term); @Override List<Term> getAllTerms(Pagination pagination); @Override List<Term> getAllTerms(Pagination pagination, Boolean includeFingerprint); @Override List<Term> getSimilarTerms(String term); }
TermsRetinaApiImpl extends BaseRetinaApi implements Terms { @Override public List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); LOG.debug("Retrieve contexts for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getContextsForTerm(term, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } TermsRetinaApiImpl(String apiKey, String basePath, String retinaName);   TermsRetinaApiImpl(TermsApi api, String retinaName); @Override List<Context> getContexts(String term, Pagination pagination, Boolean includeFingerprint); @Override List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination,
            Boolean includeFingerprint); @Override List<Term> getTerm(String term, Pagination pagination, Boolean includeFingerprint); @Override List<Context> getContexts(String term, Boolean includeFingerprint); @Override List<Context> getContexts(String term); @Override List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Boolean includeFingerprint); @Override List<Term> getSimilarTerms(String term, Integer contextId, PosType posType); @Override List<Term> getTerm(String term, Boolean includeFingerprint); @Override List<Term> getTerm(String term); @Override List<Term> getAllTerms(Pagination pagination); @Override List<Term> getAllTerms(Pagination pagination, Boolean includeFingerprint); @Override List<Term> getSimilarTerms(String term);  }