public List<Msg> getMessagesBySeverity(Severity severity) {
        return getAllMessages().stream()
                    .filter(message -> severity.equals(message.getSeverity()))
                    .collect(Collectors.toList());
    }
Component wrapper for the PrimeFaces {@code p:messages}.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/Messages.java