### Question:
QueueReader { public StoredAuditRecord nextRecord() { maybeReadNext(); StoredAuditRecord entry = nextRecord; nextRecord = null; return entry; } QueueReader(ToolOptions toolOptions);   QueueReader(ToolOptions toolOptions, ChronicleQueue chronicleQueue); boolean hasRecordAvailable(); StoredAuditRecord nextRecord();  }### Answer:
@Test public void testNothingToReadDirect() { when(tailer.readDocument(any(ReadMarshallable.class))).thenReturn(false); QueueReader reader = givenReader(); assertThat(reader.nextRecord()).isNull(); }
@Test public void testValidSingleRecordDirect() throws UnknownHostException { givenNextRecordIs(defaultValues); QueueReader reader = givenReader(); StoredAuditRecord auditRecord = reader.nextRecord(); assertRecordMatchesWire(auditRecord, defaultValues); }