public DataVersion queryBrokerTopicConfig(final String clusterName, final String brokerAddr) {
        BrokerAddrInfo addrInfo = new BrokerAddrInfo(clusterName, brokerAddr);
        BrokerLiveInfo prev = this.brokerLiveTable.get(addrInfo);
        if (prev != null) {
            return prev.getDataVersion();
        }
        return null;
    }
@Test
    public void testQueryBrokerTopicConfig() {
        {
            DataVersion targetVersion = new DataVersion();
            targetVersion.setCounter(new AtomicLong(10L));
            targetVersion.setTimestamp(100L);

            DataVersion dataVersion = routeInfoManager.queryBrokerTopicConfig("default-cluster", "127.0.0.1:10911");
            assertThat(dataVersion.equals(targetVersion)).isTrue();
        }

        {
            // register broker default-cluster-1 with the same addr, then test
            DataVersion targetVersion = new DataVersion();
            targetVersion.setCounter(new AtomicLong(20L));
            targetVersion.setTimestamp(200L);

            ConcurrentHashMap<String, TopicConfig> topicConfigConcurrentHashMap = new ConcurrentHashMap<>();
            topicConfigConcurrentHashMap.put("unit-test-0", new TopicConfig("unit-test-0"));
            topicConfigConcurrentHashMap.put("unit-test-1", new TopicConfig("unit-test-1"));

            TopicConfigSerializeWrapper topicConfigSerializeWrapper = new TopicConfigSerializeWrapper();
            topicConfigSerializeWrapper.setDataVersion(targetVersion);
            topicConfigSerializeWrapper.setTopicConfigTable(topicConfigConcurrentHashMap);
            Channel channel = mock(Channel.class);
            RegisterBrokerResult registerBrokerResult = routeInfoManager.registerBroker("default-cluster-1", "127.0.0.1:10911", "default-broker-1", 1234, "127.0.0.1:1001", "",
                    null, topicConfigSerializeWrapper, new ArrayList<>(), channel);
            assertThat(registerBrokerResult).isNotNull();

            DataVersion dataVersion0 = routeInfoManager.queryBrokerTopicConfig("default-cluster", "127.0.0.1:10911");
            assertThat(targetVersion.equals(dataVersion0)).isFalse();

            DataVersion dataVersion1 = routeInfoManager.queryBrokerTopicConfig("default-cluster-1", "127.0.0.1:10911");
            assertThat(targetVersion.equals(dataVersion1)).isTrue();
        }

        // unregister broker default-cluster-1, then test
        {
            routeInfoManager.unregisterBroker("default-cluster-1", "127.0.0.1:10911", "default-broker-1", 1234);
            assertThat(null != routeInfoManager.queryBrokerTopicConfig("default-cluster", "127.0.0.1:10911")).isTrue();
            assertThat(null == routeInfoManager.queryBrokerTopicConfig("default-cluster-1", "127.0.0.1:10911")).isTrue();
        }
    }