### Question:
SchemaEntity { public static Builder builder() { return builder(null); } SchemaEntity(
            @JsonProperty("name") String name,
            @JsonProperty("namespace") String namespace,
            @JsonProperty("fields") Set<SchemaField> fields,
            @JsonProperty("root") boolean root); String getName(); String getNamespace(); Set<SchemaField> getFields(); boolean isRoot(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); Builder toBuilder(); static Builder builder(); static Builder builder(SchemaEntity schema);  }### Answer:
@Test public void testSerializedToJsonAndBack() throws Exception { Date now = new Date(); FormattedMetadataValue metadataValue = FormattedMetadataValue.builder() .doc("abcdefg", ToStringPartFormatter.INSTANCE) .updatedAt(now) .updatedBy("me") .attributes(Collections.singletonMap("a", "b")) .build(); Set<SchemaField> fields = new HashSet<>(); fields.add(SchemaField.builder() .name("name-1") .nativeDoc("doc-1") .type(PrimitiveSchemaFieldType.builder().type(Schema.Type.STRING).build()) .metadata(FormattedMetadata.with(SchemaMetadataKey.with("subject", 1), metadataValue)) .defaultValue("") .build()); fields.add(SchemaField.builder() .name("name-2") .nativeDoc("doc-2") .type(PrimitiveSchemaFieldType.builder().type(Schema.Type.INT).build()) .metadata(FormattedMetadata.with(SchemaMetadataKey.with("subject", 1), metadataValue)) .defaultValue(1) .build()); fields.add(SchemaField.builder() .name("name-3") .nativeDoc("doc-3") .type(ParameterizedSchemaFieldType.builder() .type(Schema.Type.UNION) .addParameter(PrimitiveSchemaFieldType.builder().type(Schema.Type.NULL).build()) .addParameter(PrimitiveSchemaFieldType.builder().type(Schema.Type.DOUBLE).build()) .build()) .metadata(FormattedMetadata.with(SchemaMetadataKey.with("subject", 1), metadataValue)) .defaultValue(null) .build()); SchemaEntity origin = SchemaEntity.builder() .name("name") .namespace("namespace") .fields(fields) .root(true) .build(); String json = JsonMapper.toJson(origin); Assert.assertNotNull(json); SchemaEntity deserialized = JsonMapper.jsonToObject(json, SchemaEntity.class); Assert.assertNotNull(deserialized); Assert.assertEquals(origin, deserialized); }