@Test
public void attributeToResource() throws IllegalArgumentException, SecurityException, InstantiationException,
		IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {

	nu.xom.Element eAttr = new nu.xom.Element("attribute", SpecificationWriter.NS);
	eAttr.addAttribute(new nu.xom.Attribute("name", "test"));
	Resource attribute = new Resource("test");
	eAttr.addAttribute(new nu.xom.Attribute("type", getType(Resource.class)));
	eAttr.appendChild(((Element) attribute).getId());
	SpecificationReader reader = new SpecificationReader();
	Assert.assertEquals(attribute, reader.toAttribute(eAttr));
}