### Question:
TopicConfigManager extends ConfigManager { public TopicConfig createTopicInSendMessageMethod(final String topic, final String defaultTopic, final String remoteAddress, final int clientDefaultTopicQueueNums) { TopicConfig topicConfig = null; boolean createNew = false; try { if (this.lockTopicConfigTable.tryLock(LockTimeoutMillis, TimeUnit.MILLISECONDS)) { try { topicConfig = this.topicConfigTable.get(topic); if (topicConfig != null) return topicConfig; TopicConfig defaultTopicConfig = this.topicConfigTable.get(defaultTopic); if (defaultTopicConfig != null) { if (PermName.isInherited(defaultTopicConfig.getPerm())) { topicConfig = new TopicConfig(topic); int queueNums = clientDefaultTopicQueueNums > defaultTopicConfig.getWriteQueueNums() ? defaultTopicConfig .getWriteQueueNums() : clientDefaultTopicQueueNums; if (queueNums < 0) { queueNums = 0; } topicConfig.setReadQueueNums(queueNums); topicConfig.setWriteQueueNums(queueNums); int perm = defaultTopicConfig.getPerm(); perm &= ~PermName.PERM_INHERIT; topicConfig.setPerm(perm); topicConfig.setTopicFilterType(defaultTopicConfig.getTopicFilterType()); } else { log.warn("create new topic failed, because the default topic[" + defaultTopic + "] no perm, " + defaultTopicConfig.getPerm() + " producer: " + remoteAddress); } } else { log.warn("create new topic failed, because the default topic[" + defaultTopic + "] not exist." + " producer: " + remoteAddress); } if (topicConfig != null) { log.info("create new topic by default topic[" + defaultTopic + "], " + topicConfig + " producer: " + remoteAddress); this.topicConfigTable.put(topic, topicConfig); this.dataVersion.nextVersion(); createNew = true; this.persist(); } } finally { this.lockTopicConfigTable.unlock(); } } } catch (InterruptedException e) { log.error("createTopicInSendMessageMethod exception", e); } if (createNew) { this.brokerController.registerBrokerAll(); } return topicConfig; } TopicConfigManager();  TopicConfigManager(BrokerController brokerController); boolean isSystemTopic(final String topic); boolean isTopicCanSendMessage(final String topic); TopicConfig selectTopicConfig(final String topic); TopicConfig createTopicInSendMessageMethod(final String topic, final String defaultTopic,
            final String remoteAddress, final int clientDefaultTopicQueueNums); TopicConfig createTopicInSendMessageBackMethod(//
            final String topic, //
            final int clientDefaultTopicQueueNums,//
            final int perm//
    ); void updateTopicConfig(final TopicConfig topicConfig); void deleteTopicConfig(final String topic); TopicConfigSerializeWrapper buildTopicConfigSerializeWrapper(); @Override String encode(); String encode(final boolean prettyFormat); @Override void decode(String jsonString); @Override String configFilePath(); DataVersion getDataVersion(); ConcurrentHashMap<String, TopicConfig> getTopicConfigTable();  }### Answer:
@Test public void test_flushTopicConfig() throws Exception { BrokerController brokerController = new BrokerController( new BrokerConfig(), new NettyServerConfig(), new NettyClientConfig(), new MessageStoreConfig()); boolean initResult = brokerController.initialize(); System.out.println("initialize " + initResult); brokerController.start(); TopicConfigManager topicConfigManager = new TopicConfigManager(brokerController); TopicConfig topicConfig = topicConfigManager.createTopicInSendMessageMethod("TestTopic_SEND", MixAll.DEFAULT_TOPIC, null, 4); assertTrue(topicConfig != null); System.out.println(topicConfig); for (int i = 0; i < 10; i++) { String topic = "UNITTEST-" + i; topicConfig = topicConfigManager.createTopicInSendMessageMethod(topic, MixAll.DEFAULT_TOPIC, null, 4); assertTrue(topicConfig != null); } topicConfigManager.persist(); brokerController.shutdown(); }