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

  com.google.ads.googleads.v5.services.SharedCriterionName resourceName2 =
      com.google.ads.googleads.v5.services.SharedCriterionName.of(
          "[CUSTOMER]", "[SHARED_CRITERION]");
  SharedSetName sharedSet = SharedSetName.of("[CUSTOMER]", "[SHARED_SET]");
  long criterionId = 326773895L;
  SharedCriterion expectedResponse =
      SharedCriterion.newBuilder()
          .setResourceName(resourceName2.toString())
          .setSharedSet(sharedSet.toString())
          .setCriterionId(criterionId)
          .build();
  mockSharedCriterionService.addResponse(expectedResponse);
  SharedCriterionName resourceName = SharedCriterionName.of("[CUSTOMER]", "[SHARED_CRITERION]");
  SharedCriterion actualResponse = client.getSharedCriterion(resourceName);
  Assert.assertEquals(expectedResponse, actualResponse);
  List<AbstractMessage> actualRequests = mockSharedCriterionService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  GetSharedCriterionRequest actualRequest = (GetSharedCriterionRequest) actualRequests.get(0);
  Assert.assertEquals(resourceName, SharedCriterionName.parse(actualRequest.getResourceName()));
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}