JournalSegmentFile { static File createSegmentFile(final String name, final File directory, final long id) { return new File( directory, String.format("%s-%d.log", checkNotNull(name, "name cannot be null"), id)); } JournalSegmentFile(final File file); static boolean isSegmentFile(final String name, final File file); static boolean isSegmentFile(final String journalName, final String fileName); File file();  }
@Test public void testCreateSegmentFile() throws Exception { final File file = JournalSegmentFile.createSegmentFile("foo", new File(System.getProperty("user.dir")), 1); assertTrue(JournalSegmentFile.isSegmentFile("foo", file)); }