diff --git a/google-cloud-examples/src/test/java/com/google/cloud/examples/pubsub/snippets/ITSubscriberClientSnippets.java b/google-cloud-examples/src/test/java/com/google/cloud/examples/pubsub/snippets/ITSubscriberClientSnippets.java index c666b0edb3a7..2056503ad0fe 100644 --- a/google-cloud-examples/src/test/java/com/google/cloud/examples/pubsub/snippets/ITSubscriberClientSnippets.java +++ b/google-cloud-examples/src/test/java/com/google/cloud/examples/pubsub/snippets/ITSubscriberClientSnippets.java @@ -189,8 +189,6 @@ public void replaceSubscriptionPolicyAndTestPermissionsIsSuccessful() throws Exc assertTrue(response.getPermissionsList().contains("pubsub.subscriptions.get")); } - - private void createTopic(String name) throws Exception { try (PublisherClient publisherClient = PublisherClient.create()) { publisherClient.createTopic(TopicName.create(projectId, name)); @@ -201,7 +199,7 @@ private Set publishMessages(String topicName, int numMessages) throws Ex Set messages = new HashSet<>(); Publisher publisher = Publisher.newBuilder(TopicName.create(projectId, topicName)).build(); for (int i = 1; i<= numMessages; i++) { - String message = formatForTest("message-" + String.valueOf(i)); + String message = formatForTest("message-" + i); PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData( ByteString.copyFromUtf8(message)).build(); publisher.publish(pubsubMessage);