- return Matchers.argThat(new ArgumentMatcher<UpdateElectionTerm>() {
- @Override
- public boolean matches(Object argument) {
- UpdateElectionTerm other = (UpdateElectionTerm) argument;
- return term == other.getCurrentTerm() && votedFor.equals(other.getVotedFor());
- }
-
- @Override
- public void describeTo(Description description) {
- description.appendValue(new UpdateElectionTerm(term, votedFor));
- }
- });
+ return ArgumentMatchers.argThat(
+ other -> term == other.getCurrentTerm() && votedFor.equals(other.getVotedFor()));