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

  com.google.ads.googleads.v5.services.KeywordPlanAdGroupName resourceName2 =
      com.google.ads.googleads.v5.services.KeywordPlanAdGroupName.of(
          "[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]");
  KeywordPlanAdGroup expectedResponse =
      KeywordPlanAdGroup.newBuilder().setResourceName(resourceName2.toString()).build();
  mockKeywordPlanAdGroupService.addResponse(expectedResponse);
  KeywordPlanAdGroupName resourceName =
      KeywordPlanAdGroupName.of("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]");
  KeywordPlanAdGroup actualResponse = client.getKeywordPlanAdGroup(resourceName);
  Assert.assertEquals(expectedResponse, actualResponse);
  List<AbstractMessage> actualRequests = mockKeywordPlanAdGroupService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  GetKeywordPlanAdGroupRequest actualRequest =
      (GetKeywordPlanAdGroupRequest) actualRequests.get(0);
  Assert.assertEquals(
      resourceName, KeywordPlanAdGroupName.parse(actualRequest.getResourceName()));
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}