AttributeRegistry { public static void loadAllAttributeClasses() { final Map<String, Class<?>> unloadedClasses = new HashMap<>(); for (final Entry<String, Class<?>> entry : attributeClassByAttrNameTmp .entrySet()) { try { Class.forName(entry.getValue().getName()); } catch (final ClassNotFoundException e) { unloadedClasses.put(entry.getKey(), entry.getValue()); if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning("Could not load attribute class " + entry.getValue().getName()); } } } attributeClassByAttrNameTmp.clear(); if (unloadedClasses.size() > 0) { attributeClassByAttrNameTmp.putAll(unloadedClasses); } else { attributeClassByAttrNameTmp = null; } }  static void register(final String... attrNames); static List<String> getAttributeNames(); static List<String> getBooleanAttributeNames(); static Integer getIndexByAttributeName(final String attributeName); static Map<String, String> getAttributeClassNameByAttributeName(); static void loadAllAttributeClasses(); static AbstractAttribute getNewAttributeInstance(
            final String attributeName); static AbstractAttribute getNewAttributeInstance(
            final String attributeName, final String attributeValue); static AbstractAttribute getNewAttributeInstanceOrNullIfFailed(
            final String attributeName, final String attributeValue); static AbstractAttribute getNewAttributeInstanceOrNullIfFailed(
            final int attributeNameIndex, final String attributeValue);  }
@Test public void testLoadAllAttributeClasses() throws Exception { try { AttributeRegistry.test(); AttributeRegistry.test1(); } catch (InvalidValueException e) { e.printStackTrace(); fail(e.getMessage()); } AttributeRegistry.loadAllAttributeClasses(); }