@Test
  public void bannerIsLoggedToFileBeforeLogMessage() throws Exception {
    geodeLogger.info(logMessage);

    List<String> lines = readLines(mainLogFile, defaultCharset());

    boolean foundBanner = false;
    boolean foundLogMessage = false;

    for (String line : lines) {
      if (containsAny(line, displayValues())) {
        assertThat(foundLogMessage).as("Banner should be logged before log message: " + lines)
            .isFalse();
        foundBanner = true;
      }
      if (line.contains(logMessage)) {
        assertThat(foundBanner).as("Log message should be logged after banner: " + lines)
            .isTrue();
        foundLogMessage = true;
      }
    }

    assertThat(foundBanner).as("Banner not found in: " + lines).isTrue();
    assertThat(foundLogMessage).as("Log message not found in: " + lines).isTrue();
  }
Verifies that the banner is logged before any log messages.
geode-core/src/integrationTest/java/org/apache/geode/logging/internal/BannerLoggingIntegrationTest.java