@Test
public void x_goog_api_client_header_isSent() {

  GoogleAdsClient client =
      GoogleAdsClient.newBuilder()
          .setCredentials(fakeCredentials)
          .setDeveloperToken(DEVELOPER_TOKEN)
          .setLoginCustomerId(LOGIN_CUSTOMER_ID)
          .setEnableGeneratedCatalog(enabledGeneratedCatalog)
          .setTransportChannelProvider(localChannelProvider)
          .setEndpoint("fake-address")
          .build();
  mockService.addResponse(SearchGoogleAdsResponse.newBuilder().build());
  try (GoogleAdsServiceClient googleAdsClient =
      client.getLatestVersion().createGoogleAdsServiceClient()) {
    googleAdsClient.search("123", "select blah");
  }
  assertTrue(
      "GAX/GRPC/Java platform headers missing",
      localChannelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}