use of io.confluent.kafkarest.entities.TopicConfig in project kafka-rest by confluentinc.
the class ListAllTopicsConfigsActionTest method listTopicConfigs_noTopics_returnsEmptyConfigs.
@Test
public void listTopicConfigs_noTopics_returnsEmptyConfigs() {
expect(topicManager.listTopics(CLUSTER_ID)).andReturn(completedFuture(new ArrayList<>()));
expect(topicConfigManager.listTopicConfigs(CLUSTER_ID, new ArrayList<>())).andReturn(completedFuture(new HashMap<String, List<TopicConfig>>()));
replay(topicManager, topicConfigManager);
FakeAsyncResponse response = new FakeAsyncResponse();
allTopicConfigsResource.listTopicConfigs(response, CLUSTER_ID);
ListTopicConfigsResponse expected = ListTopicConfigsResponse.create(TopicConfigDataList.builder().setMetadata(ResourceCollection.Metadata.builder().setSelf("/v3/clusters/cluster-1/topics/-/configs").build()).setData(new ArrayList<>()).build());
assertEquals(expected, response.getValue());
}
Aggregations