### Question:
NavigableMapOLogEntryOracle implements OLogEntryOracle { @Override public long getGreatestSeqNum() { return greatestSeqNum; }  @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 reportsAGreatestSeqNumOfZeroWhenNothingHasBeenLogged() throws Exception { assertThat(oracle.getGreatestSeqNum(), is(equalTo(0L))); }
@Test public void reportsTheGreatestSeqNumLogged() throws Exception { havingLogged( entries() .term(8).seqNums(1, 2, 3)); assertThat(oracle.getGreatestSeqNum(), is(equalTo(3L))); }
@Test public void takesTruncationIntoAccountWhenReportingTheGreatestSeqNumLogged() throws Exception { havingLogged( entries() .term(8).seqNums(1, 2, 3)); havingTruncatedToSeqNum(2); assertThat(oracle.getGreatestSeqNum(), is(equalTo(1L))); havingTruncatedToSeqNum(1); assertThat(oracle.getGreatestSeqNum(), is(equalTo(0L))); }