CloudVision { public static AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext( List<Feature> features, long batchSize, int desiredRequestParallelism) { return new AnnotateImagesFromBytesWithContext(features, batchSize, desiredRequestParallelism); }  static AnnotateImagesFromGcsUri annotateImagesFromGcsUri(
      PCollectionView<Map<String, ImageContext>> contextSideInput,
      List<Feature> features,
      long batchSize,
      int desiredRequestParallelism); static AnnotateImagesFromGcsUri annotateImagesFromGcsUri(
      PCollectionView<Map<String, ImageContext>> contextSideInput,
      List<Feature> features,
      long batchSize); static AnnotateImagesFromBytes annotateImagesFromBytes(
      PCollectionView<Map<ByteString, ImageContext>> contextSideInput,
      List<Feature> features,
      long batchSize,
      int desiredRequestParallelism); static AnnotateImagesFromBytes annotateImagesFromBytes(
      PCollectionView<Map<ByteString, ImageContext>> contextSideInput,
      List<Feature> features,
      long batchSize); static AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext(
      List<Feature> features, long batchSize, int desiredRequestParallelism); static AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext(
      List<Feature> features, long batchSize); static AnnotateImagesFromGcsUriWithContext annotateImagesFromGcsUriWithContext(
      List<Feature> features, long batchSize, int desiredRequestParallelism); static AnnotateImagesFromGcsUriWithContext annotateImagesFromGcsUriWithContext(
      List<Feature> features, long batchSize);  }
@Test public void shouldConvertKVOfBytesToRequest() { CloudVision.AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext = CloudVision.annotateImagesFromBytesWithContext(features, 1, 1); AnnotateImageRequest request = annotateImagesFromBytesWithContext.mapToRequest(KV.of(TEST_BYTES, null), null); assertEquals(1, request.getFeaturesCount()); assertEquals(TEST_BYTES, request.getImage().getContent()); }