- if (behavior instanceof Candidate) {
- // Resetting the Candidates term to make sure it will match
- // the term sent by AppendEntries. If this was not done then
- // the test will fail because the Candidate will assume that
- // the message was sent to it from a lower term peer and will
- // thus respond with a failure
- context.getTermInformation().update(2, "test");
- }
+ assertFalse("This test should be overridden when testing Candidate", behavior instanceof Candidate);
+
+ RaftState expected = behavior.state();