sink.close();
assertEquals(0, wal.getWritingTags().size());
assertEquals(1, wal.getLoggedTags().size());
// logged values can transition to the sending state by getting a sender.
EventSource curSource = wal.getUnsentSource();
// no state change
assertEquals(0, wal.getWritingTags().size());
assertEquals(0, wal.getLoggedTags().size());
assertEquals(1, wal.getSendingTags().size());
// open changes state
curSource.open();
assertEquals(0, wal.getLoggedTags().size());
assertEquals(1, wal.getSendingTags().size());
// read next event
Event e = null;
ConsoleEventSink console = new ConsoleEventSink();
while ((e = curSource.next()) != null) {
console.append(e);
}
curSource.close();
assertEquals(0, wal.getSendingTags().size());
}