[test] Correctly clear the previous rafts
[test] Adding tests for data event