@Test
@SuppressWarnings("all")
public void listPhotosTest() {

  String nextPageToken = "";
  Photo photosElement = Photo.newBuilder().build();
  List<Photo> photos = Arrays.asList(photosElement);
  ListPhotosResponse expectedResponse =
      ListPhotosResponse.newBuilder()
          .setNextPageToken(nextPageToken)
          .addAllPhotos(photos)
          .build();
  mockStreetViewPublishService.addResponse(expectedResponse);
  PhotoView view = PhotoView.BASIC;
  String filter = "filter-1274492040";
  ListPhotosPagedResponse pagedListResponse = client.listPhotos(view, filter);
  List<Photo> resources = Lists.newArrayList(pagedListResponse.iterateAll());
  Assert.assertEquals(1, resources.size());
  Assert.assertEquals(expectedResponse.getPhotosList().get(0), resources.get(0));
  List<GeneratedMessageV3> actualRequests = mockStreetViewPublishService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  ListPhotosRequest actualRequest = (ListPhotosRequest) actualRequests.get(0);
  Assert.assertEquals(view, actualRequest.getView());
  Assert.assertEquals(filter, actualRequest.getFilter());
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}