PaxosTimestampBoundStore implements TimestampBoundStore { @Override public synchronized long getUpperLimit() { List<PaxosLong> responses = getLatestSequenceNumbersFromAcceptors(); PaxosLong max = Ordering.natural().onResultOf(PaxosLong::getValue).max(responses); agreedState = getAgreedState(max.getValue()); return agreedState.getBound(); } PaxosTimestampBoundStore(
            PaxosProposer proposer,
            PaxosLearner knowledge,
            PaxosAcceptorNetworkClient acceptorNetworkClient,
            PaxosLearnerNetworkClient learnerClient,
            long maximumWaitBeforeProposalMs); @Override synchronized long getUpperLimit(); @Override synchronized void storeUpperLimit(long limit);  }
@Test public void timestampsBeginFromZero() { assertThat(store.getUpperLimit()).isEqualTo(0L); }
@Test public void throwsIfCannotObtainQuorum() { failureToggles.get(1).set(true); failureToggles.get(2).set(true); failureToggles.get(3).set(true); assertThatThrownBy(() -> store.getUpperLimit()).isInstanceOf(ServiceNotAvailableException.class); }