@Override
  public Set<String> listTopicNames() {
    try {
      return ExecutorUtil.executeWithRetries(
          () -> adminClient.get().listTopics().names().get(),
          ExecutorUtil.RetryBehaviour.ON_RETRYABLE);
    } catch (final Exception e) {
      throw new KafkaResponseGetFailedException("Failed to retrieve Kafka Topic names", e);
    }
  }
@Test
  public void shouldListTopicNames() {
    // When:
    givenTopicExists("topicA", 1, 1);
    givenTopicExists("topicB", 1, 2);

    when(adminClient.listTopics())
        .thenAnswer(listTopicResult());

    // When:
    final Set<String> names = kafkaTopicClient.listTopicNames();

    // Then:
    assertThat(names, is(ImmutableSet.of("topicA", "topicB")));
  }