@Test
public void toApplicationTest() throws ValidityException, ParsingException, IOException, ClassNotFoundException,
		InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {

	nu.xom.Element eApp = new nu.xom.Element("application", SpecificationWriter.NS);
	nu.xom.Element r1 = new nu.xom.Element("task", SpecificationWriter.NS);
	r1.addAttribute(new Attribute("id", "r1"));
	eApp.appendChild(r1);
	nu.xom.Element r2 = new nu.xom.Element("communication", SpecificationWriter.NS);
	r2.addAttribute(new Attribute("id", "r2"));
	eApp.appendChild(r2);
	nu.xom.Element l = new nu.xom.Element("dependency", SpecificationWriter.NS);
	l.addAttribute(new Attribute("id", "l"));
	l.addAttribute(new Attribute("source", "r1"));
	l.addAttribute(new Attribute("destination", "r2"));
	eApp.appendChild(l);
	SpecificationReader r = new SpecificationReader();
	Application<Task, Dependency> application = r.toApplication(eApp);
	Assert.assertNotNull(application.getVertex("r1"));
	Assert.assertNotNull(application.getVertex("r2"));
	Assert.assertNotNull(application.getEdge("l"));
}