### Question:
FormattedMetadata { public static FormattedMetadata with(MetadataKey key, FormattedMetadataValue value) { return new FormattedMetadata(key, value); } FormattedMetadata(
            @JsonProperty("key") MetadataKey key,
            @JsonProperty("value") FormattedMetadataValue value); MetadataKey getKey(); FormattedMetadataValue getValue(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static FormattedMetadata with(MetadataKey key, FormattedMetadataValue value); static FormattedMetadata with(MetadataKey key, MetadataValue value, PartFormatter formatter); static FormattedMetadata with(Metadata metadata, PartFormatter formatter);  }### Answer:
@Test public void testSerializedToJsonAndBack() throws Exception { Date date = new Date(); FieldMetadataKey key = FieldMetadataKey.with("subject", 1, "schemaFullName", "field"); MetadataValue value = MetadataValue.builder() .doc("doc") .attribute("a", "a") .updatedAt(date) .updatedBy("updateBy") .build(); FormattedMetadata origin = FormattedMetadata.with(key, value, ToStringPartFormatter.INSTANCE); String json = JsonMapper.toJson(origin); Assert.assertNotNull(json); FormattedMetadata deserialized = JsonMapper.jsonToObject(json, FormattedMetadata.class); Assert.assertNotNull(deserialized); Assert.assertEquals(origin, deserialized); }