@Test
    void verifyOperation() {
        var results = messageSanitizer.sanitize("ticket TGT-1-abcdefg created");
        assertTrue(results.contains("TGT-1-********"));
        results = messageSanitizer.sanitize("ticket PGT-1-abcdefg created");
        assertTrue(results.contains("PGT-1-********"));
        results = messageSanitizer.sanitize("ticket PGTIOU-1-abcdefg created");
        assertTrue(results.contains("PGTIOU-1-********"));
        results = messageSanitizer.sanitize("ticket PT-1-abcdefg created");
        assertTrue(results.contains("PT-1-********"));
        results = messageSanitizer.sanitize("ticket ST-1-abcdefg created");
        assertTrue(results.contains("ST-1-********"));

        results = messageSanitizer.sanitize("found a [password =se!ns4357$##@@**it!!_ive] here...");
        assertTrue(results.contains("[password =********"));

        results = messageSanitizer.sanitize(new ToStringBuilder(this)
            .append("password", "abcdefgs")
            .append("field", "value")
            .toString());
        assertTrue(results.contains("password = ********"));

        results = messageSanitizer.sanitize("found a [token=mgf63isnfb1s!!#ut0__|] here...");
        assertTrue(results.contains("[token=********"));

        results = messageSanitizer.sanitize("found a ,clientSecret = p@$$wordSecret...");
        assertTrue(results.matches(".+,clientSecret = \\*\\*\\*\\*\\*\\*\\*\\*.*\\.\\.\\."));
    }
This is {@link DefaultMessageSanitizerTests}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-tickets/src/test/java/org/apereo/cas/util/DefaultMessageSanitizerTests.java