TopicDiff { public boolean changesConfig() { for (String address : differences.keySet()) { if (address.startsWith(AddedConfigEntry.ADDRESS_PREFIX)) { return true; } } return false; } private  TopicDiff(Map<String, Difference> differences, ObjectMeta objectMeta); static TopicDiff diff(Topic source, Topic target); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); boolean isEmpty(); boolean changesNumPartitions(); int numPartitionsDelta(); boolean changesConfig(); boolean changesReplicationFactor(); Topic apply(Topic topic); String conflict(TopicDiff other); boolean conflicts(TopicDiff other); TopicDiff merge(TopicDiff other);  }
@Test public void testChangesConfig() { Topic topicC = new Topic.Builder(topicB.getTopicName(), topicB.getNumPartitions(), topicB.getConfig()).build(); assertThat(TopicDiff.diff(topicB, topicA).changesConfig(), is(true)); assertThat(TopicDiff.diff(topicA, topicB).changesConfig(), is(true)); assertThat(TopicDiff.diff(topicB, topicC).changesConfig(), is(false)); }