@Test
  public void loggedMessageShouldMatchCustomLayout() {
    geodeLogger.warn(warnMessage);

    assertThat(systemOutRule.getLog()).contains(Level.WARN.name());
    assertThat(systemOutRule.getLog()).contains(warnMessage);
    assertThat(systemOutRule.getLog()).contains(CONFIG_LAYOUT_PREFIX);
    assertThat(CUSTOM_REGEX.matcher(systemOutRule.getLog()).matches()).isTrue();
  }
Integration tests for {@link Cache} with custom {@code log4j2.xml}.
geode-log4j/src/integrationTest/java/org/apache/geode/logging/log4j/internal/impl/CacheWithCustomLogConfigIntegrationTest.java