### Question:
MetadataDocAttributeExtractor { public static Map<String, List<Object>> extract(String doc) { return extract(DocParser.parse(doc)); } private  MetadataDocAttributeExtractor(); static Map<String, List<Object>> extract(String doc); static Map<String, List<Object>> extract(List<Part> parts); static String formatAttributeKey(TagType tagType, String paramName); static boolean isAttributeKey(String key);  }### Answer:
@Test public void testAttributesExtracted() throws Exception { Map<String, List<Object>> attributes = MetadataDocAttributeExtractor.extract( "{@link title1|link1} blablabla " + "{@sql_table database1|schema1|table1} blablabla " + "{@link title2|link2} blabla " + "{@schema_link title1|||}"); Assert.assertNotNull(attributes); Assert.assertEquals(6, attributes.size()); Assert.assertNotNull(attributes.get("LINK.title")); Assert.assertEquals(2, attributes.get("LINK.title").size()); Assert.assertEquals("title1", attributes.get("LINK.title").get(0)); Assert.assertEquals("title2", attributes.get("LINK.title").get(1)); Assert.assertNotNull(attributes.get("LINK.link")); Assert.assertEquals(2, attributes.get("LINK.link").size()); Assert.assertEquals("link1", attributes.get("LINK.link").get(0)); Assert.assertEquals("link2", attributes.get("LINK.link").get(1)); Assert.assertNotNull(attributes.get("SQL_TABLE.database")); Assert.assertEquals(1, attributes.get("SQL_TABLE.database").size()); Assert.assertEquals("database1", attributes.get("SQL_TABLE.database").get(0)); Assert.assertNotNull(attributes.get("SQL_TABLE.schema")); Assert.assertEquals(1, attributes.get("SQL_TABLE.schema").size()); Assert.assertEquals("schema1", attributes.get("SQL_TABLE.schema").get(0)); Assert.assertNotNull(attributes.get("SQL_TABLE.table")); Assert.assertEquals(1, attributes.get("SQL_TABLE.table").size()); Assert.assertEquals("table1", attributes.get("SQL_TABLE.table").get(0)); Assert.assertNotNull(attributes.get("SCHEMA_LINK.title")); Assert.assertEquals(1, attributes.get("SCHEMA_LINK.title").size()); Assert.assertEquals("title1", attributes.get("SCHEMA_LINK.title").get(0)); }