raft: add tests based on section 5.2 in raft paper

#1408 
we need to verify the map is empty in the end, right?