### Feature and motivation

Selenium still uses JUnit 4 (see eg https://github.com/SeleniumHQ/selenium/blob/702b3aae7385adf331d75cdeacd79720cf6b9c84/java/maven_deps.bzl#L56, https://github.com/SeleniumHQ/selenium/blob/702b3aae7385adf331d75cdeacd79720cf6b9c84/java/test/org/openqa/selenium/testing/JUnit4TestBase.java#L35)
JUnit 5 is out since 2017 and widely adopted.

I´m asking for this because there are issues when using JUnit 5 and Selenium 4 together. (https://github.com/SeleniumHQ/selenium/issues/9359) IMO such issues already should be recognized during automated testing.
SessionId sessionId, String... expectedMessages)
    throws IOException {
    StringBuilder expectedLogMessage = new StringBuilder(
      "\n<RC_Logs RC_Session_ID=");
    expectedLogMessage.append(sessionId);
    expectedLogMessage.append(">\n");
    for (String expectedMessage : expectedMessages) {
      expectedLogMessage.append("[FORMATTED] ");
      expectedLogMessage.append(expectedMessage);
    }
    expectedLogMessage.append("\n</RC_Logs>\n");
    String loggedMessage = handler.getLog(sessionId);
    assertEquals("Wrong message logged.", expectedLogMessage.toString(),
      loggedMessage);
  }
  private void assertNoMessageLoggedForSessionId(
    PerSessionLogHandler handler, SessionId sessionId) throws IOException {
    assertMessagesLoggedForSessionId(handler, sessionId);
  }
  private PerSessionLogHandler createPerSessionLogHandler() {
    return new PerSessionLogHandler(CAPACITY, new FormatterStub(), false);
  }
  static class FormatterStub extends Formatter {
    @Override
    public String format(LogRecord record) {
      return "[FORMATTED] " + record.getMessage();
    }
  }
}