diff --git a/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppIT.java b/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppIT.java index 18f0bcc5512..17886c77432 100644 --- a/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppIT.java +++ b/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppIT.java @@ -19,7 +19,7 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.fail; -import com.google.api.services.vision.v1.model.GoogleCloudVisionV1EntityAnnotation; +import com.google.api.services.vision.v1.model.EntityAnnotation; import com.google.common.collect.ImmutableSet; import org.junit.Before; @@ -46,11 +46,11 @@ public class LabelAppIT { } @Test public void labelImage_cat_returnsCatDescription() throws Exception { - List labels = + List labels = appUnderTest.labelImage(Paths.get("data/cat.jpg"), MAX_LABELS); ImmutableSet.Builder builder = ImmutableSet.builder(); - for (GoogleCloudVisionV1EntityAnnotation label : labels) { + for (EntityAnnotation label : labels) { builder.add(label.getDescription()); } ImmutableSet descriptions = builder.build(); diff --git a/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppTest.java b/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppTest.java index afda34c5985..6a238a3d248 100644 --- a/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppTest.java +++ b/vision/label/src/test/java/com/google/cloud/vision/samples/label/LabelAppTest.java @@ -18,7 +18,7 @@ import static com.google.common.truth.Truth.assertThat; -import com.google.api.services.vision.v1.model.GoogleCloudVisionV1EntityAnnotation; +import com.google.api.services.vision.v1.model.EntityAnnotation; import com.google.common.collect.ImmutableList; import org.junit.Test; @@ -42,7 +42,7 @@ public class LabelAppTest { // Act LabelApp.printLabels( - out, Paths.get("path/to/some/image.jpg"), ImmutableList.of()); + out, Paths.get("path/to/some/image.jpg"), ImmutableList.of()); // Assert assertThat(bout.toString()).contains("No labels found."); @@ -52,11 +52,11 @@ public class LabelAppTest { // Arrange ByteArrayOutputStream bout = new ByteArrayOutputStream(); PrintStream out = new PrintStream(bout); - ImmutableList labels = + ImmutableList labels = ImmutableList.of( - new GoogleCloudVisionV1EntityAnnotation().setDescription("dog").setScore(0.7564f), - new GoogleCloudVisionV1EntityAnnotation().setDescription("husky").setScore(0.67891f), - new GoogleCloudVisionV1EntityAnnotation().setDescription("poodle").setScore(0.1233f)); + new EntityAnnotation().setDescription("dog").setScore(0.7564f), + new EntityAnnotation().setDescription("husky").setScore(0.67891f), + new EntityAnnotation().setDescription("poodle").setScore(0.1233f)); // Act LabelApp.printLabels(out, Paths.get("path/to/some/image.jpg"), labels);