@Test public void getSlicesForTextTest_withFingerprints() throws ApiException, JsonProcessingException { int count = 4; boolean getFingerprint = false; when(textApi.getSlicesForText(eq(TEXT), eq(getFingerprint), eq(NOT_NULL_RETINA), isNull(Integer.class), isNull(Integer.class))).thenReturn(createTexts(count)); List<Text> texts = textRetinaApiImpl.getSlices(TEXT, getFingerprint); assertEquals(count, texts.size()); verify(textApi, times(1)).getSlicesForText(eq(TEXT), eq(getFingerprint), eq(NOT_NULL_RETINA), isNull(Integer.class), isNull(Integer.class)); }
@Override public List<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } pagination = initPagination(pagination); LOG.debug("Retrieve slices for the text: " + text + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return this.api.getSlicesForText(text, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } pagination = initPagination(pagination); LOG.debug("Retrieve slices for the text: " + text + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return this.api.getSlicesForText(text, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } pagination = initPagination(pagination); LOG.debug("Retrieve slices for the text: " + text + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return this.api.getSlicesForText(text, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } TextRetinaApiImpl(String apiKey, String basePath, String retinaName);   TextRetinaApiImpl(final TextApi api, String retinaName); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } pagination = initPagination(pagination); LOG.debug("Retrieve slices for the text: " + text + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return this.api.getSlicesForText(text, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } 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<Text> getSlices(String text, Pagination pagination, Boolean includeFingerprint) throws ApiException { if (isEmpty(text)) { throw new IllegalArgumentException(NULL_TEXT_MSG); } pagination = initPagination(pagination); LOG.debug("Retrieve slices for the text: " + text + " pagination: " + pagination.toString() + " include fingerprint: " + includeFingerprint); return this.api.getSlicesForText(text, includeFingerprint, retinaName, pagination.getStartIndex(), pagination.getMaxResults()); } 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);  }