public TemporaryFolder baseDir = new TemporaryFolder();
@org.junit.Test
public void testClean() throws Exception {
File dir = create("a-0", "a-1", "a-2", "malformed", "b-0", "c-0", "c-5");
LogDirectoryCleaner cleaner = new LogDirectoryCleaner(dir, 1);
cleaner.run();
List<String> remaining = Lists.newArrayList(dir.list());
Collections.sort(remaining);
Assert.assertEquals(Lists.newArrayList("a-1", "a-2", "b-0", "c-5", "malformed"), remaining);
}