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

    List<String> startupConfigLines = Arrays.asList(startupConfiguration);
    List<String> logLines = FileUtils.readLines(mainLogFile, Charset.defaultCharset());

    boolean foundStartupConfig = false;
    boolean foundLogMessage = false;

    for (String line : logLines) {
      if (startupConfigLines.contains(line)) {
        assertThat(foundLogMessage)
            .as("Startup configuration should be before log message: " + logLines).isFalse();
        foundStartupConfig = true;
      }
      if (line.contains(logMessage)) {
        assertThat(foundStartupConfig)
            .as("Log message should be after startup configuration: " + logLines).isTrue();
        foundLogMessage = true;
      }
    }

    assertThat(foundStartupConfig).as("Startup configuration not found in: " + logLines).isTrue();
    assertThat(foundLogMessage).as("Log message not found in: " + logLines).isTrue();
  }
Integration tests for logging of the startup configuration. Startup configuration consists of
{@link Configuration#STARTUP_CONFIGURATION} and {@link DistributionConfig#toLoggerString()}.
geode-core/src/integrationTest/java/org/apache/geode/logging/internal/StartupConfigurationLoggingIntegrationTest.java