RequestVoteReply extends AbstractRaftRPC { public boolean isVoteGranted() { return voteGranted; } RequestVoteReply(final long term, final boolean voteGranted); boolean isVoteGranted(); @Override String toString();  }
@Test public void testSerialization() { RequestVoteReply expected = new RequestVoteReply(5, true); RequestVoteReply cloned = (RequestVoteReply) SerializationUtils.clone(expected); assertEquals("getTerm", expected.getTerm(), cloned.getTerm()); assertEquals("isVoteGranted", expected.isVoteGranted(), cloned.isVoteGranted()); }