### Question:
QuorumDelegatingLog implements OLog, AutoCloseable { @Override public ListenableFuture<Boolean> logEntries(List<OLogEntry> passedInEntries, String quorumId) { List<OLogEntry> entries = validateAndMakeDefensiveCopy(passedInEntries); getQuorumStructure(quorumId).ensureEntriesAreConsecutive(entries); updateOracleWithNewEntries(entries, quorumId); return submitQuorumTask(quorumId, () -> { currentLog(quorumId).append(entries); maybeSyncLogForQuorum(quorumId); return true; }); } QuorumDelegatingLog(LogPersistenceService<?> persistenceService,
                             KeySerializingExecutor taskExecutor,
                             OLogEntryOracleFactory OLogEntryOracleFactory,
                             PersistenceNavigatorFactory persistenceNavigatorFactory
  ); @Override ListenableFuture<Void> openAsync(String quorumId); @Override ListenableFuture<Boolean> logEntries(List<OLogEntry> passedInEntries, String quorumId); @Override ListenableFuture<List<OLogEntry>> getLogEntries(long start, long end, String quorumId); @Override ListenableFuture<Boolean> truncateLog(long seqNum, String quorumId); @Override long getNextSeqNum(String quorumId); @Override long getLastTerm(String quorumId); @Override long getLogTerm(long seqNum, String quorumId); @Override QuorumConfigurationWithSeqNum getLastQuorumConfig(String quorumId); @Override ListenableFuture<Void> roll(String quorumId); @Override void close();  }### Answer:
@Test(expected = RuntimeException.class) public void throwsAnExceptionIfAskedToLogEntriesWithASequenceGap() throws Exception { log.logEntries(someConsecutiveEntries(1, 3), quorumId); log.logEntries(someConsecutiveEntries(4, 5), quorumId); }
@Test(expected = RuntimeException.class) public void throwsAnExceptionIfAskedToLogEntriesWithoutAscendingSequenceNumber() throws Exception { log.logEntries(someConsecutiveEntries(1, 2), quorumId); log.logEntries(someConsecutiveEntries(1, 2), quorumId); }