Enh: little refactoring of the raft test, better object thing