@Test
    void verifyGetNonNullMessage() {
        val exception = new UndeclaredThrowableException(new Exception("nested"));
        assertEquals("nested", LoggingUtils.getMessage(exception));
        val exception2 = new Exception("first", new Exception("second"));
        assertEquals("first", LoggingUtils.getMessage(exception2));
        val exception3 = new UndeclaredThrowableException(new Exception(new RuntimeException()));
        assertEquals("java.lang.RuntimeException", LoggingUtils.getMessage(exception3));
    }
This is {@link LoggingUtilsTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/LoggingUtilsTests.java