raft: add tests