### Question:
SchemaDocumentConverter { public static LiteSchemaInfo toLiteSchemaInfo(SchemaDocument source) { if (source == null) { return null; } return LiteSchemaInfo.builder() .subject(source.getSubject()) .version(source.getVersion()) .schemaRegistryId(source.getSchemaRegistryId()) .name(source.getRootName()) .namespace(source.getRootNamespace()) .fullName(source.getRootFullname()) .compatibility(source.getCompatibility()) .mode(source.getMode()) .versionLatest(source.getVersionLatest()) .deleted(source.getDeleted()) .build(); } private  SchemaDocumentConverter(); static LiteSchemaInfo toLiteSchemaInfo(SchemaDocument source);  }### Answer:
@Test public void testConvert() { SchemaDocument doc = new SchemaDocument(); doc.setEcoId("ecoId"); doc.setSchemaRegistryId(1); doc.setSubject("subject"); doc.setVersion(2); doc.setVersionLatest(true); doc.setCompatibility("BACKWARD_TRANSITIVE"); doc.setMode("IMPORT"); doc.setRootName("rootName"); doc.setRootNamespace("rootNamespace"); doc.setRootFullname("rootFullname"); doc.setDeleted(false); doc.addName("name-1"); doc.addName("name-2"); doc.addNamespace("namespace-1"); doc.addNamespace("namespace-2"); doc.addFullname("fullname-1"); doc.addFullname("fullname-2"); doc.addDoc("doc-1"); doc.addDoc("doc-2"); doc.addLogicalType("logicalType-1"); doc.addLogicalType("logicalType-2"); doc.addPath("path-1"); doc.addPath("path-2"); doc.addAlias("alias-1"); doc.addAlias("alias-2"); doc.addProperty("key-1", "value-1"); doc.addProperty("key-2", "value-2"); MetadataDocument metaDoc = new MetadataDocument(); metaDoc.addDoc("doc-1"); metaDoc.addDoc("doc-2"); metaDoc.addAttribute("key-1", "object-1"); metaDoc.addAttribute("key-2", "object-2"); metaDoc.addUpdatedBy("updateBy-1"); metaDoc.addUpdatedBy("updateBy-2"); doc.setMetadata(metaDoc); LiteSchemaInfo schemaInfo = SchemaDocumentConverter.toLiteSchemaInfo(doc); Assert.assertEquals("subject", schemaInfo.getSubject()); Assert.assertEquals(EcoIdUtils.formatId("subject", 2), schemaInfo.getEcoId()); Assert.assertEquals(1, schemaInfo.getSchemaRegistryId()); Assert.assertEquals(2, schemaInfo.getVersion()); Assert.assertEquals("rootFullname", schemaInfo.getFullName()); Assert.assertEquals("rootName", schemaInfo.getName()); Assert.assertEquals("rootNamespace", schemaInfo.getNamespace()); Assert.assertEquals(AvroCompatibilityLevel.BACKWARD_TRANSITIVE, schemaInfo.getCompatibility()); Assert.assertEquals(Mode.IMPORT, schemaInfo.getMode()); Assert.assertTrue(schemaInfo.isVersionLatest()); Assert.assertFalse(schemaInfo.isDeleted()); }