@Test
public void canConvertRequestVoteMessageToAndFromProtobuf() throws Exception {

  RequestVote pojo = new RequestVote(12, "foo", 43, 44);
  RaftProto.RequestVote proto = RaftProto.RequestVote.newBuilder()
    .setTerm(12)
    .setCandidateId("foo")
    .setLastLogIndex(43)
    .setLastLogTerm(44)
    .build();
  assertThat(ProtoUtils.convert(pojo)).isEqualTo(proto);
  assertThat(ProtoUtils.convert(proto)).isEqualTo(pojo);
}