Map<Long, PendingMessage> emptyAcks = Maps.newHashMap();
final DirectoryScanner scanner = new DirectoryScanner(inputDir, Pattern.compile(".*\\.log"));
final File logFile = new File(inputDir, "test");
Files.write("1\n2\n3\n", logFile, Charsets.UTF_8);
scanner.forceInput(logFile, 2);
SpoutState.recordCurrentState(emptyAcks, scanner, new FakeParser(), statusFile);
SpoutState rs = SpoutState.fromString(Files.toString(statusFile, Charsets.UTF_8));
assertEquals(0, rs.getOldFiles().size());
assertEquals(1, rs.getOffsets().size());