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

  com.google.ads.googleads.v5.services.TopicConstantName resourceName2 =
      com.google.ads.googleads.v5.services.TopicConstantName.of("[TOPIC_CONSTANT]");
  long id = 3355L;
  com.google.ads.googleads.v5.services.TopicConstantName topicConstantParent =
      com.google.ads.googleads.v5.services.TopicConstantName.of("[TOPIC_CONSTANT]");
  TopicConstant expectedResponse =
      TopicConstant.newBuilder()
          .setResourceName(resourceName2.toString())
          .setId(id)
          .setTopicConstantParent(topicConstantParent.toString())
          .build();
  mockTopicConstantService.addResponse(expectedResponse);
  TopicConstantName resourceName = TopicConstantName.of("[TOPIC_CONSTANT]");
  TopicConstant actualResponse = client.getTopicConstant(resourceName);
  Assert.assertEquals(expectedResponse, actualResponse);
  List<AbstractMessage> actualRequests = mockTopicConstantService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  GetTopicConstantRequest actualRequest = (GetTopicConstantRequest) actualRequests.get(0);
  Assert.assertEquals(resourceName, TopicConstantName.parse(actualRequest.getResourceName()));
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}