use of org.apache.kafka.common.TopicCollection.TopicNameCollection in project kafka by apache.
the class TopicCollectionTest method testTopicCollection.
@Test
public void testTopicCollection() {
List<Uuid> topicIds = Arrays.asList(Uuid.randomUuid(), Uuid.randomUuid(), Uuid.randomUuid());
List<String> topicNames = Arrays.asList("foo", "bar");
TopicCollection idCollection = TopicCollection.ofTopicIds(topicIds);
TopicCollection nameCollection = TopicCollection.ofTopicNames(topicNames);
assertTrue(((TopicIdCollection) idCollection).topicIds().containsAll(topicIds));
assertTrue(((TopicNameCollection) nameCollection).topicNames().containsAll(topicNames));
}
Aggregations