### Question:
MongoTrackingToken implements TrackingToken, Serializable { public static MongoTrackingToken of(Instant timestamp, String eventIdentifier) { return new MongoTrackingToken(timestamp.toEpochMilli(), Collections.singletonMap(eventIdentifier, timestamp.toEpochMilli())); } protected  MongoTrackingToken(long timestamp, Map<String, Long> trackedEvents); static MongoTrackingToken of(Instant timestamp, String eventIdentifier); @JsonCreator static MongoTrackingToken of(@JsonProperty("timestamp") Instant timestamp,
                                        @JsonProperty("trackedEvents") Map<String, Long> trackedEvents); MongoTrackingToken advanceTo(Instant timestamp, String eventIdentifier, Duration lookBackTime); Instant getTimestamp(); Map<String, Long> getTrackedEvents(); @JsonIgnore Set<String> getKnownEventIds(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override TrackingToken lowerBound(TrackingToken other); @Override TrackingToken upperBound(TrackingToken other); @Override boolean covers(TrackingToken other);  }### Answer:
@Test void testSerializationDeserialization() throws IOException { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.registerModule(new JavaTimeModule()); MongoTrackingToken mongoTrackingToken = MongoTrackingToken.of(time(1000), "0"); String serialized = objectMapper.writeValueAsString(mongoTrackingToken); MongoTrackingToken deserialized = objectMapper.readValue(serialized, MongoTrackingToken.class); assertEquals(mongoTrackingToken, deserialized); }