@Test
public void testGetAllTopics() {

    // sending response before request, as getTopicMetadata is a blocking call
    client.prepareResponse(newMetadataResponse(topicName, Errors.NONE).toStruct());
    Map<String, List<PartitionInfo>> allTopics = fetcher.getAllTopicMetadata(5000L);
    assertEquals(cluster.topics().size(), allTopics.size());
}