@Test public void shouldGetNextLogNumber() throws IOException { String[] s = new String[] {"sync.0.log", "invalid", "sync.2.log", "sync.1.log"}; int lastLogNumber = writer.getLastLogNumber(s); assertEquals(lastLogNumber, 2); }