public void testRegisterAttribute() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, InstantiationException { final ElementTypeRegistry elementTypeRegistry = new ElementTypeRegistry(); for ( ElementMetaData metaData : ElementTypeRegistry.getInstance().getAllElementTypes() ) { elementTypeRegistry.registerElement( metaData ); } final DefaultElementMetaData metaData = (DefaultElementMetaData) elementTypeRegistry .getElementType( LabelType.INSTANCE.getMetaData().getName() ); final AttributeMetaData attrMeta = metaData.getAttributeDescription( "namespace", "Name" ); assertNull( attrMeta ); final AttributeRegistry attributeRegistry = elementTypeRegistry.getAttributeRegistry( LabelType.INSTANCE ); final DefaultAttributeMetaData m = new DefaultAttributeMetaData( "namespace", "Name", BUNDLE_LOCATION, "prefix", String.class, false, ClassicEngineBoot.computeCurrentVersionId() ); attributeRegistry.putAttributeDescription( m ); final AttributeMetaData attributeDescription = metaData.getAttributeDescription( "namespace", "Name" ); assertEquals( "prefix", attributeDescription.getKeyPrefix() ); assertEquals( BUNDLE_LOCATION, attributeDescription.getBundleLocation() ); } }