public static ValidateTopicResult validateTopic(String topic) {

        if (UtilAll.isBlank(topic)) {
            return new ValidateTopicResult(false, "The specified topic is blank.");
        }

        if (isTopicOrGroupIllegal(topic)) {
            return new ValidateTopicResult(false, "The specified topic contains illegal characters, allowing only ^[%|a-zA-Z0-9_-]+$");
        }

        if (topic.length() > TOPIC_MAX_LENGTH) {
            return new ValidateTopicResult(false, "The specified topic is longer than topic max length.");
        }

        return new ValidateTopicResult(true, "");
    }
@Test
    public void testTopicValidator_Pass() {
        TopicValidator.ValidateTopicResult res = TopicValidator.validateTopic("TestTopic");
        assertThat(res.isValid()).isTrue();
        assertThat(res.getRemark()).isEmpty();
    }