### Question:
LogGeneration extends AbstractLogDir implements Comparable<LogGeneration> { public int getLastIncludedIndex() { return lastIncludedIndex; } LogGeneration(File baseDir, int lastIncludedIndex);   LogGeneration(File dir); int getLastIncludedIndex(); @Override int compareTo(@Nonnull LogGeneration o); @Override String toString();  }### Answer:
@Test public void testCreateFromFile() { LogGeneration generation = new LogGeneration(new File("log-6")); Assert.assertEquals(6, generation.getLastIncludedIndex()); }
@Test public void testCreateWithBaseDir() { LogGeneration generation = new LogGeneration(new File("data"), 10); Assert.assertEquals(10, generation.getLastIncludedIndex()); Assert.assertEquals("log-10", generation.get().getName()); }