use of com.google.cloud.vision.v1.EntityAnnotation in project java-vision by googleapis.
the class ITSystemTest method detectTextGcsTest.
@Test
public void detectTextGcsTest() throws IOException {
List<AnnotateImageResponse> responses = getResponsesList("text/screen.jpg", Type.TEXT_DETECTION, true);
List<String> actual = new ArrayList<>();
for (AnnotateImageResponse res : responses) {
for (EntityAnnotation annotation : res.getTextAnnotationsList()) {
actual.add(annotation.getDescription());
}
}
String joinedActual = String.join(" ", actual);
assertThat(joinedActual).contains("37%");
}
Aggregations