@Test public void getRepresentationForTextTest() throws ApiException { int count = 4; when(textApi.getRepresentationForText(eq(TEXT), eq(NOT_NULL_RETINA))).thenReturn( createFingerprints(count)); List<Fingerprint> fingerprints = textRetinaApiImpl.getFingerprints(TEXT); assertEquals(count, fingerprints.size()); verify(textApi, times(1)).getRepresentationForText(eq(TEXT), eq(NOT_NULL_RETINA)); }
@Override public List<Fingerprint> getFingerprints(String text) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve representation for the text: " + text); return this.api.getRepresentationForText(text, retinaName); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprints(String text) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve representation for the text: " + text); return this.api.getRepresentationForText(text, retinaName); } }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprints(String text) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve representation for the text: " + text); return this.api.getRepresentationForText(text, retinaName); } TextRetinaApiImpl(String apiKey, String basePath, String retinaName);   TextRetinaApiImpl(final TextApi api, String retinaName); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprints(String text) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve representation for the text: " + text); return this.api.getRepresentationForText(text, retinaName); } TextRetinaApiImpl(String apiKey, String basePath, String retinaName);   TextRetinaApiImpl(final TextApi api, String retinaName); @Override List<String> getKeywords(String text); @Override List<Fingerprint> getFingerprints(String text); @Override List<Fingerprint> getFingerprintBulk(Double sparsity, Text... texts); @Override List<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint); @Override List<String> getTokens(String text, PosTag[] posTags); @Override List<Text> getSlices(String text, Boolean includeFingerprint); @Override List<Text> getSlices(String text); @Override Retina identifyRetinaByText(String text); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprints(String text) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve representation for the text: " + text); return this.api.getRepresentationForText(text, retinaName); } TextRetinaApiImpl(String apiKey, String basePath, String retinaName);   TextRetinaApiImpl(final TextApi api, String retinaName); @Override List<String> getKeywords(String text); @Override List<Fingerprint> getFingerprints(String text); @Override List<Fingerprint> getFingerprintBulk(Double sparsity, Text... texts); @Override List<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint); @Override List<String> getTokens(String text, PosTag[] posTags); @Override List<Text> getSlices(String text, Boolean includeFingerprint); @Override List<Text> getSlices(String text); @Override Retina identifyRetinaByText(String text);  }