//starts out empty
assertTrue(!journal.pending().hasNext());
/////////////////////////
//successful addition of one request
Request request = new Request(Command.Signal);
journal.append(request);
//stop journal and force reload from disk
journal.close();
journal = new C2EntryServiceLogFileJournal(tempFile,4096);
assertEquals(request, journal.pending().next());
///////////////////////////////
//successful removal of one request
journal.markSent(request);
//stop journal and force reload from disk
journal.close();
journal = new C2EntryServiceLogFileJournal(tempFile,4096);
assertTrue("check file:"+tempFile,!journal.pending().hasNext());
//////////////////////////////////
//successful addition of two requests in order
Request request2 = new Request(Command.Cancel);
assert(!request.equals(request2));
journal.append(request);
//stop journal and force reload from disk
journal.close();