@Test
  public void showLogContainsMostRecentlyLoggedMessage() {
    createCacheWithLogFile();
    logger.info(logMessage);

    String log = memberMXBean.showLog(0);

    assertThat(log).contains(logMessage);
  }
Integration tests for {@link MemberMXBean} with just a {@link Cache}.
geode-core/src/integrationTest/java/org/apache/geode/management/MemberMXBeanShowLogIntegrationTest.java