@Test public void getSimilarTermsTest_withFingerprintAndPagination() throws ApiException { int count = 5; boolean getFingerprint = false; int contextId = 0; int startIndex = 0; int maxResults = 100; PosType posType = PosType.VERB; Pagination pagination = new Pagination(startIndex, maxResults); when( termApi.getSimilarTerms(eq(TERM), eq(contextId), eq(posType.name()), eq(getFingerprint), eq(NOT_NULL_RETINA), eq(startIndex), eq(maxResults))).thenReturn(createTerms(count)); List<Term> terms = termRetinaApiImpl.getSimilarTerms(TERM, contextId, posType, pagination, getFingerprint); assertEquals(count, terms.size()); verify(termApi, times(1)).getSimilarTerms(eq(TERM), eq(contextId), eq(posType.name()), eq(getFingerprint), eq(NOT_NULL_RETINA), eq(startIndex), eq(maxResults)); }
@Override public List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); String posTypeName = null; if (posType != null) { posTypeName = posType.name(); } LOG.debug("Retrieve Similar for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getSimilarTerms(term, contextId, posTypeName, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); }
TermsRetinaApiImpl extends BaseRetinaApi implements Terms { @Override public List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); String posTypeName = null; if (posType != null) { posTypeName = posType.name(); } LOG.debug("Retrieve Similar for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getSimilarTerms(term, contextId, posTypeName, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } }
TermsRetinaApiImpl extends BaseRetinaApi implements Terms { @Override public List<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); String posTypeName = null; if (posType != null) { posTypeName = posType.name(); } LOG.debug("Retrieve Similar for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getSimilarTerms(term, contextId, posTypeName, 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<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); String posTypeName = null; if (posType != null) { posTypeName = posType.name(); } LOG.debug("Retrieve Similar for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getSimilarTerms(term, contextId, posTypeName, 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<Term> getSimilarTerms(String term, Integer contextId, PosType posType, Pagination pagination, Boolean includeFingerprint) throws ApiException { pagination = initPagination(pagination); validateTerm(term); String posTypeName = null; if (posType != null) { posTypeName = posType.name(); } LOG.debug("Retrieve Similar for the term: " + term + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return api.getSimilarTerms(term, contextId, posTypeName, 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);  }