@Test
public void testGetAllTopicsDisconnect() {

    // first try gets a disconnect, next succeeds
    client.prepareResponse(null, true);
    client.prepareResponse(newMetadataResponse(topicName, Errors.NONE).toStruct());
    Map<String, List<PartitionInfo>> allTopics = fetcher.getAllTopicMetadata(5000L);
    assertEquals(cluster.topics().size(), allTopics.size());
}