### Question:
ChronicleAuditLogger implements AuditLogger { @Override public void log(AuditEntry logEntry) { AuditRecordWriteMarshallable auditRecordWriteMarshallable = new AuditRecordWriteMarshallable(logEntry, configuredFields); try { writer.put(auditRecordWriteMarshallable); } catch (InterruptedException e) { LOG.warn("Interrupted while sending message to Chronicle writer"); Thread.currentThread().interrupt(); } } ChronicleAuditLogger(Map<String, String> parameters); @VisibleForTesting  ChronicleAuditLogger(ChronicleWriter writer, FieldSelector configuredFields); @Override void log(AuditEntry logEntry);  }### Answer:
@Test public void singleStatement() throws Exception { AuditEntry expectedAuditEntry = likeGenericRecord().build(); logger.log(expectedAuditEntry); assertThatWireMatchRecord(expectedAuditEntry); }
@Test public void batchStatement() throws Exception { AuditEntry expectedAuditEntry = likeGenericRecord().batch(UUID.fromString("4910e9a6-9d26-40f8-ad8c-5c0436784969")).build(); logger.log(expectedAuditEntry); assertThatWireMatchRecord(expectedAuditEntry); }
@Test public void interruptOnPut() throws Exception { AuditEntry expectedAuditEntry = likeGenericRecord().build(); doThrow(InterruptedException.class).when(mockWriter).put(any()); logger.log(expectedAuditEntry); assertThat(Thread.currentThread().isInterrupted()).isTrue(); Thread.interrupted(); }