@Test
public void shouldNotMarkEntryAsCommittedIfNotReceiveAQuorumOfAcks() throws RPCException, StorageException {

    setupLeaderForCommitUnitTests();
    // receive only one ack for the NOOP entry
    algorithm.onAppendEntriesReply(S_03, 3, 3, 1, true);
    // fast forward to the next heartbeat
    timer.fastForward();
    Collection<AppendEntries> heartbeats = getRPCs(4, AppendEntries.class);
    for (AppendEntries heartbeat : heartbeats) {
        if (heartbeat.server.equals(S_03)) {
            assertThatAppendEntriesHasValues(
                    heartbeat,
                    3, 0, 4, 3,
                    NOOP(5, 3),
                    NOOP(6, 3),
                    NOOP(7, 3),
                    NOOP(8, 3),
                    NOOP(9, 3)
            );
        } else {
            assertThatAppendEntriesHasValues(
                    heartbeat,
                    3, 0, 3, 2,
                    NOOP(4, 3),
                    NOOP(5, 3),
                    NOOP(6, 3),
                    NOOP(7, 3),
                    NOOP(8, 3),
                    NOOP(9, 3)
            );
        }
    }
    assertThatNoMoreRPCsWereSent();
    // and that nothing changed in the log, term, or commitIndex
    assertThatLogContains(
            SENTINEL(),
            NOOP(1, 1),
            NOOP(2, 1),
            NOOP(3, 2),
            NOOP(4, 3),
            NOOP(5, 3),
            NOOP(6, 3),
            NOOP(7, 3),
            NOOP(8, 3),
            NOOP(9, 3)
    );
    assertThatTermAndCommitIndexHaveValues(3, 0);
}