### Question:
Type { public Predicate getOrCreatePredicate(String name, Direction direction) { return predicates.computeIfAbsent(direction.name() + "\n" + name, key -> predicateMaker.apply(name, direction)); } @JsonCreator  Type(@JsonProperty("name") String name); Collection<Predicate> getPredicates(); void setPredicates(Collection<Predicate> predicates); Predicate getOrCreatePredicate(String name, Direction direction); long getSubjectsWithThisType(); String getName(); @Override String toString(); @Override boolean equals(Object obj); Predicate getPredicate(String name, Direction direction); void registerSubject(int mut);  }### Answer:
@Test public void isSerializable() throws IOException { Type type = new Type("http: type.getOrCreatePredicate("http: type.getOrCreatePredicate("http: ObjectMapper mapper = new ObjectMapper() .registerModule(new Jdk8Module()) .registerModule(new GuavaModule()) .registerModule(new TimbuctooCustomSerializers()) .enable(SerializationFeature.INDENT_OUTPUT); String result = mapper.writeValueAsString(type); Type loadedType = mapper.readValue(result, Type.class); assertThat(loadedType, is(type)); }