class TopologyBuilder {

    public synchronized Map<Integer, TopicsInfo> topicGroups() {
        final Map<Integer, InternalTopologyBuilder.TopicsInfo> topicGroupsWithNewTopicsInfo = internalTopologyBuilder.topicGroups();
        final Map<Integer, TopicsInfo> topicGroupsWithDeprecatedTopicInfo = new HashMap<>();

        for (final Map.Entry<Integer, InternalTopologyBuilder.TopicsInfo> entry : topicGroupsWithNewTopicsInfo.entrySet()) {
            final InternalTopologyBuilder.TopicsInfo newTopicsInfo = entry.getValue();

            topicGroupsWithDeprecatedTopicInfo.put(entry.getKey(), new TopicsInfo(
                newTopicsInfo.sinkTopics,
                newTopicsInfo.sourceTopics,
                newTopicsInfo.repartitionSourceTopics,
                newTopicsInfo.stateChangelogTopics));
        }

        return topicGroupsWithDeprecatedTopicInfo;
    }

    public  TopologyBuilder();

}