### Question:
NavigableMapOLogEntryOracle implements OLogEntryOracle { @Override public QuorumConfigurationWithSeqNum getLastQuorumConfig() { if (configMap.isEmpty()) { return new QuorumConfigurationWithSeqNum(QuorumConfiguration.EMPTY, 0); } else { final Map.Entry<Long, QuorumConfiguration> lastEntry = configMap.lastEntry(); return new QuorumConfigurationWithSeqNum(lastEntry.getValue(), lastEntry.getKey()); } }  @Override void notifyLogging(OLogEntry entry); @Override void notifyTruncation(long seqNum); @Override long getGreatestSeqNum(); @Override long getLastTerm(); @Override long getTermAtSeqNum(long seqNum); @Override QuorumConfigurationWithSeqNum getLastQuorumConfig();  }### Answer:
@Test public void returnsTheLastQuorumConfigurationAndItsSeqNum() throws Exception { havingLogged( entries() .term(999) .seqNums(5) .configurationAndSeqNum(firstConfig, 6) .seqNums(7, 8, 9)); assertThat(oracle.getLastQuorumConfig(), is(equalTo(configurationAndSeqNum(firstConfig, 6)))); havingLogged( entries() .term(999) .configurationAndSeqNum(secondConfig, 10)); assertThat(oracle.getLastQuorumConfig(), is(equalTo(configurationAndSeqNum(secondConfig, 10)))); }
@Test public void handlesTruncationsAndUpdatesQuorumConfigurationInformationAccordingly() throws Exception { havingLogged( entries() .term(7).configurationAndSeqNum(firstConfig, 1)); havingTruncatedToSeqNum(1); assertThat(oracle.getLastQuorumConfig(), is(equalTo(configurationAndSeqNum(EMPTY, 0)))); havingLogged( entries() .term(8).configurationAndSeqNum(secondConfig, 2)); assertThat(oracle.getLastQuorumConfig(), is(equalTo(configurationAndSeqNum(secondConfig, 2)))); }