@Test
public void testFileNamePattern() 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(10);
  sentryLogger.addAppender(appender);
  sentryLogger.debug("123456789012345");
  File[] files = dataDir.listFiles();
  if (files != null) {
    assertEquals(files.length, 2);
    assertTrue(files[0].getName().contains("auditLog.log."));
    assertTrue(files[1].getName().contains("auditLog.log."));
  } else {
    fail("Excepted 2 log files.");
  }
}