### Question:
MetadataDocAttributeExtractor { public static boolean isAttributeKey(String key) { Validate.notNull(key, "Key is null"); Matcher matcher = KEY_PATTERN.matcher(key); if (!matcher.find()) { return false; } String typeName = matcher.group(1); String paramName = matcher.group(2); TagType tagType = TagType.forName(typeName); return tagType != null && tagType.paramIndex(paramName) != null; } 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 testAttributeKeyVerified() throws Exception { Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("abc")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("abc.def")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey(".")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SQL_TABLE.database")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SQL_TABLE.schema")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SQL_TABLE.table")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SQL_TABLE.Database")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SQL_TABLE.schema1")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SQL_TABLE._table")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.title")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.subject")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.version")); Assert.assertTrue(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.link")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.title_")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK")); Assert.assertFalse(MetadataDocAttributeExtractor.isAttributeKey("SCHEMA_LINK.1link")); }