private void fillLogWithTraceMsgs(Environment env, int numToAdd) {
   EnvironmentImpl envImpl = DbInternal.getEnvironmentImpl(env);
   FileManager fileManager = envImpl.getFileManager();
   Long beforeTracing = getLastFileNum(env);
   logger.info("BeforeTracing end file = 0x" + Long.toHexString(beforeTracing));
   do {
     for (int i = 0; i <= 100; i++) {
       Trace.trace(envImpl, STUFF + i);
     }
   } while (fileManager.getLastFileNum() <= (beforeTracing + numToAdd));
   Long afterTracing = fileManager.getLastFileNum();
   logger.info("AfterTracing end file = 0x" + Long.toHexString(afterTracing));
   /* Check that we've grown the log by a good bit - at least 40 files */
   assertTrue((afterTracing - beforeTracing) > 40);
 }
 private long getLastFileNum(Environment env) {
   EnvironmentImpl envImpl = DbInternal.getEnvironmentImpl(env);
   FileManager fileManager = envImpl.getFileManager();
   return fileManager.getLastFileNum();
 }