### Question:
FieldName implements Serializable { final Object readResolve(){ return create(getValue()); } private  FieldName(String value); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); String getValue(); @JsonCreator static FieldName create(String value); static final Map<String, FieldName> CACHE; static final ThreadLocal<Map<String, FieldName>> CACHE_PROVIDER; }### Answer:
@Test public void readResolve() throws Exception { FieldName name = FieldName.create("x"); FieldName clonedName; Map<String, FieldName> cache = new HashMap<>(); try { FieldName.CACHE_PROVIDER.set(cache); clonedName = SerializationUtil.clone(name); assertEquals(name, clonedName); assertNotSame(name, clonedName); } finally { FieldName.CACHE_PROVIDER.remove(); } assertEquals(1, cache.size()); clonedName = SerializationUtil.clone(name); assertSame(name, clonedName); }