@Test(expected = InvalidTopicException.class)
public void testGetTopicMetadataInvalidTopic() {

    client.prepareResponse(newMetadataResponse(topicName, Errors.INVALID_TOPIC_EXCEPTION).toStruct());
    fetcher.getTopicMetadata(new MetadataRequest(Collections.singletonList(topicName)), 5000L);
}