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

  com.google.ads.googleads.v5.services.AdName resourceName2 =
      com.google.ads.googleads.v5.services.AdName.of("[CUSTOMER]", "[AD]");
  long id = 3355L;
  String trackingUrlTemplate = "trackingUrlTemplate-1611329070";
  String finalUrlSuffix = "finalUrlSuffix-1825164662";
  String displayUrl = "displayUrl1714674802";
  boolean addedByGoogleAds = false;
  com.google.ads.googleads.v5.services.AdName name =
      com.google.ads.googleads.v5.services.AdName.of("[CUSTOMER]", "[AD]");
  Ad expectedResponse =
      Ad.newBuilder()
          .setResourceName(resourceName2.toString())
          .setId(id)
          .setTrackingUrlTemplate(trackingUrlTemplate)
          .setFinalUrlSuffix(finalUrlSuffix)
          .setDisplayUrl(displayUrl)
          .setAddedByGoogleAds(addedByGoogleAds)
          .setName(name.toString())
          .build();
  mockAdService.addResponse(expectedResponse);
  AdName resourceName = AdName.of("[CUSTOMER]", "[AD]");
  Ad actualResponse = client.getAd(resourceName);
  Assert.assertEquals(expectedResponse, actualResponse);
  List<AbstractMessage> actualRequests = mockAdService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  GetAdRequest actualRequest = (GetAdRequest) actualRequests.get(0);
  Assert.assertEquals(resourceName, AdName.parse(actualRequest.getResourceName()));
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}