private String readContents(final File file) throws IOException {
    assertThat(file).exists();

    BufferedReader reader = new BufferedReader(new FileReader(file));
    StringBuilder buffer = new StringBuilder();
    int numRead;
    char[] chars = new char[1024];

    while ((numRead = reader.read(chars)) != -1) {
      String readData = String.valueOf(chars, 0, numRead);
      buffer.append(readData);
      chars = new char[1024];
    }

    return buffer.toString();
  }
Integration tests for log rolling with {@link DistributedSystem} lifecycle.

@since GemFire 6.5
geode-core/src/integrationTest/java/org/apache/geode/logging/internal/api/LogRollingWithDistributedSystemIntegrationTest.java