public static void assertLogContains(LoggerRule logging, String expectedText) {
        assertTrue(
                "The log should contain '" + expectedText + "'",
                logging.getMessages().stream().anyMatch(m -> m.contains(expectedText)));
    }
Checks whether {@link LoggerRule} has recorded the message.
@param logging Logger rule
@param expectedText Text to check
@since 1.25
test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java