JournalSegmentFile { public static boolean isSegmentFile(final String name, final File file) { return isSegmentFile(name, file.getName()); } 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 testIsSegmentFile() throws Exception { assertTrue(JournalSegmentFile.isSegmentFile("foo", "foo-1.log")); assertFalse(JournalSegmentFile.isSegmentFile("foo", "bar-1.log")); assertTrue(JournalSegmentFile.isSegmentFile("foo", "foo-1-1.log")); }