@Test
public void testRollOver() throws Throwable {

  if (dataDir == null) {
    fail("Excepted temp folder for audit log is created.");
  }
  RollingFileWithoutDeleteAppender appender = new RollingFileWithoutDeleteAppender(
      new PatternLayout("%m%n"), dataDir.getPath() + "/auditLog.log");
  appender.setMaximumFileSize(100);
  sentryLogger.addAppender(appender);
  // Write exactly 10 bytes with each log
  for (int i = 0; i < 99; i++) {
    if (i < 10) {
      sentryLogger.debug("Hello---" + i);
    } else if (i < 100) {
      sentryLogger.debug("Hello--" + i);
    }
  }
  if (dataDir != null) {
    File[] files = dataDir.listFiles();
    if (files != null) {
      assertEquals(files.length, 10);
    } else {
      fail("Excepted 10 log files.");
    }
  } else {
    fail("Excepted 10 log files.");
  }
}