@Test public void getRepresentationsForBulkTextTest() throws ApiException, JsonProcessingException { double sparsity = 0.5; int count = 4; when(textApi.getRepresentationsForBulkText(any(String.class), eq(NOT_NULL_RETINA), eq(sparsity))).thenReturn( createFingerprints(count)); List<Fingerprint> fingerprints = textRetinaApiImpl.getFingerprintBulk(sparsity, new Text(TEXT), new Text(TEXT_2), new Text( TEXT_3)); assertEquals(count, fingerprints.size()); verify(textApi, times(1)).getRepresentationsForBulkText(any(String.class), eq(NOT_NULL_RETINA), eq(sparsity)); }
@Override public List<Fingerprint> getFingerprintBulk(Double sparsity, Text... texts) throws JsonProcessingException, ApiException { validateRequiredModels(texts); LOG.debug("Retrieve representation for the bulk Text: " + toJson(texts) + " sparsity: " + sparsity); return this.api.getRepresentationsForBulkText(toJson(texts), retinaName, sparsity); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprintBulk(Double sparsity, Text... texts) throws JsonProcessingException, ApiException { validateRequiredModels(texts); LOG.debug("Retrieve representation for the bulk Text: " + toJson(texts) + " sparsity: " + sparsity); return this.api.getRepresentationsForBulkText(toJson(texts), retinaName, sparsity); } }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprintBulk(Double sparsity, Text... texts) throws JsonProcessingException, ApiException { validateRequiredModels(texts); LOG.debug("Retrieve representation for the bulk Text: " + toJson(texts) + " sparsity: " + sparsity); return this.api.getRepresentationsForBulkText(toJson(texts), retinaName, sparsity); } TextRetinaApiImpl(String apiKey, String basePath, String retinaName);   TextRetinaApiImpl(final TextApi api, String retinaName); }
TextRetinaApiImpl extends BaseRetinaApi implements Texts { @Override public List<Fingerprint> getFingerprintBulk(Double sparsity, Text... texts) throws JsonProcessingException, ApiException { validateRequiredModels(texts); LOG.debug("Retrieve representation for the bulk Text: " + toJson(texts) + " sparsity: " + sparsity); return this.api.getRepresentationsForBulkText(toJson(texts), retinaName, sparsity); } 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> getFingerprintBulk(Double sparsity, Text... texts) throws JsonProcessingException, ApiException { validateRequiredModels(texts); LOG.debug("Retrieve representation for the bulk Text: " + toJson(texts) + " sparsity: " + sparsity); return this.api.getRepresentationsForBulkText(toJson(texts), retinaName, sparsity); } 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);  }