TagRegistry { public static Map<String, String> getTagClassNameByTagName() { return TAG_CLASS_NAME_BY_TAG_NAME; }  static List<String> getTagNames(); static Integer getIndexByTagName(final String tagName); static void register(final String... tagNamesToRegister); static Map<String, String> getTagClassNameByTagName(); static Map<String, Class<?>> getTagClassByTagName(); static void loadAllTagClasses(); static AbstractHtml getNewTagInstance(final String tagName); static AbstractHtml getNewTagInstance(final String tagName,
            final AbstractHtml parent, final AbstractAttribute... attributes); static AbstractHtml getNewTagInstanceOrNullIfFailed(
            final String tagName, final AbstractHtml parent,
            final AbstractAttribute... attributes); static AbstractHtml getNewTagInstanceOrNullIfFailed(
            final int tagNameIndex, final AbstractHtml parent,
            final AbstractAttribute... attributes);  }
@Test public void testIfAllTagNamesAreReffered() throws Exception { Field[] fields = TagNameConstants.class.getFields(); for (Field field : fields) { final String constantName = field.get(null).toString(); final String simpleClassName = TagRegistry .getTagClassNameByTagName().get(constantName); if (simpleClassName == null) { fail(constantName + " tag name is not included in all tag names map"); } else if (!simpleClassName.replace("Tag", "") .equalsIgnoreCase(constantName.replace("-", ""))) { fail(constantName + " tag has an incorrect class mapping"); } } }