Added check for non-unique Raft IDs and more unittests