@Test
	public void testSaveConfiguration() {
		
		// initialization
		XMLManipulatorImpl manipulator = new XMLManipulatorImpl(new File("META-INF/test_ConfFiles/valid1.xml"));
		XMLDocument document = null;
		try {
			document = manipulator.loadConfiguration();
		} catch (XMLException e) {
			fail("Some error during processing");
		}
		
		XMLElement provider = new XMLElement();
		List<XMLAttribute> attributes = new ArrayList<XMLAttribute>();
		List<XMLElement> children = new  ArrayList<XMLElement>();
		provider.setAddress("/jbossesb/providers/bus-provider");		
		XMLAttribute attr = new XMLAttribute("String", true, null, "Pokus", "name", null, "name");
		attributes.add(attr);
		provider.setAttributes(attributes);
		
		XMLElement element = new XMLElement();
		children.add(element);
		provider.setChildren(children);
		element.setAddress("/jbossesb/providers/bus-provider/bus");
		attributes = new ArrayList<XMLAttribute>();
		attr = new XMLAttribute("String", true, null, "pokus", "Bus id", null, "busid");
		attributes.add(attr);
		element.setAttributes(attributes);
		document.addProvider(provider);
		
		List<XMLAttribute> temp = document.getJbossesb().getChildren().get(0).getChildren().get(0).getAttributes();
		temp.remove(1);
		temp.get(0).setValue("1");
		
		try {
			manipulator.saveConfiguration(document);
		} catch (XMLException e) {
			fail("Some error during saving configuration");
		}
		
		// tests
		try {
			assertTrue(Arrays.equals(createChecksum("META-INF/test_ConfFiles/valid1.xml"), createChecksum("META-INF/test_ConfFiles/valid1modify.xml")));
		} catch (Exception e) {
			fail("Can't read needed files");
		}
	}