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

  com.google.ads.googleads.v5.services.DistanceViewName resourceName2 =
      com.google.ads.googleads.v5.services.DistanceViewName.of("[CUSTOMER]", "[DISTANCE_VIEW]");
  boolean metricSystem = true;
  DistanceView expectedResponse =
      DistanceView.newBuilder()
          .setResourceName(resourceName2.toString())
          .setMetricSystem(metricSystem)
          .build();
  mockDistanceViewService.addResponse(expectedResponse);
  DistanceViewName resourceName = DistanceViewName.of("[CUSTOMER]", "[DISTANCE_VIEW]");
  DistanceView actualResponse = client.getDistanceView(resourceName);
  Assert.assertEquals(expectedResponse, actualResponse);
  List<AbstractMessage> actualRequests = mockDistanceViewService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  GetDistanceViewRequest actualRequest = (GetDistanceViewRequest) actualRequests.get(0);
  Assert.assertEquals(resourceName, DistanceViewName.parse(actualRequest.getResourceName()));
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}