Archiver { public void init() { final File logDir = new File(logPath); if (! logDir.exists()) { logDir.mkdirs(); } } Archiver(String logPath, String service, long maxFileSize);  Archiver(String logPath, String service, long maxFileSize, TimeProvider timeProvider); void init(); WriteReport handle(final Timber.LogEvent logEvent); void flush(); void close();  }
@Test public void testInitialization() throws Exception { final String logPath = temp.newFolder("test1").getAbsolutePath(); final Archiver archiver = new Archiver(logPath, SERVICENAME, MEGABYTE); archiver.init(); }
@Test public void testInitializationUnexist() throws Exception { final String logPath = temp.newFolder("test2").getAbsolutePath() + File.separator + "unexist"; final Archiver archiver = new Archiver(logPath, SERVICENAME, MEGABYTE); archiver.init(); }