@Test
	public void testLoadConfiguration() {
		 
		// initialization
		XMLManipulatorImpl manipulator = new XMLManipulatorImpl(new File("META-INF/test_ConfFiles/valid1.xml"));
		try {
			XMLDocument document = manipulator.loadConfiguration();
			
			// tests
			assertNotNull(document);
			assertNull(document.getGlobals());
			assertNotNull(document.getJbossesb());			
			
			assertNotNull(document.getJbossesb().getChildren());
			assertTrue(document.getJbossesb().getChildren().size() > 0);
			
			assertEquals(5, document.getProviders().size());
			assertEquals(3, document.getServices().size());
			assertEquals(4, document.getJbossesb().getAttributes().size());
			
			boolean notFound = true;
			for (XMLElement element : document.getProviders()) {
				if (element.getName().equals("HTTP Provider")) {
					notFound = false;
					assertEquals("HTTP Provider", element.getHint());					
					assertEquals(1, element.getAttributes().size());
					assertEquals("Name", element.getAttributes().get(0).getName());
					assertEquals("JBossHTTP", element.getAttributes().get(0).getValue());
					assertEquals("Name", element.getAttributes().get(0).getHint());
					assertEquals("String", element.getAttributes().get(0).getType());
					assertEquals("name", element.getAttributes().get(0).getXmlName());
					assertEquals(0, element.getAttributes().get(0).getAllowedValues().size());
					assertEquals(true, element.getAttributes().get(0).isRequired());
					assertEquals(1, element.getChildren().size());
				}
			}
			if (notFound) {
				fail("Providers don't contain elemement - HTTP Provider");
			}	
		} catch (XMLException e) {
			fail();
		}
		
		manipulator = new XMLManipulatorImpl(new File("META-INF/test_ConfFiles/valid3.xml"));
		try {
			manipulator.loadConfiguration();
		} catch (XMLException e) {
			fail();
		}
	}