/**
* @return a new Object mapper with configured deserializer for barge' object model.
*/
public static ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
SimpleModule raftMessagesModule = new SimpleModule("MyModule", new Version(0, 1, 0, null, "org.robotninjas", "barge"))
.addDeserializer(RequestVote.class, new RequestVoteDeserializer())
.addDeserializer(HttpClusterConfig.class, new HttpClusterConfigDeserializer())
.addDeserializer(HttpReplica.class, new HttpReplicaDeserializer())
.addDeserializer(RequestVoteResponse.class, new RequestVoteResponseDeserializer())
.addDeserializer(AppendEntries.class, new AppendEntriesDeserializer())