@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))); }
@Override public long getGreatestSeqNum() { return greatestSeqNum; }
NavigableMapOLogEntryOracle implements OLogEntryOracle { @Override public long getGreatestSeqNum() { return greatestSeqNum; } }
NavigableMapOLogEntryOracle implements OLogEntryOracle { @Override public long getGreatestSeqNum() { return greatestSeqNum; }  }
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(); }
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();  }