    @Test
    public void testApplyChanges(){

        Element modificationsRoot = new DefaultElement("project");
        Element targetRoot = new DefaultElement("project");

        Document target = DocumentFactory.getInstance().createDocument(targetRoot);
        Document modifications = DocumentFactory.getInstance().createDocument(modificationsRoot);

        Element targetDependencies = target.getRootElement().addElement("dependencies");

        Element dependency = modifications.getRootElement()
                .addElement("dependencies")
                .addElement("dependency").addAttribute("sdk-copy", "true");

        dependency.addElement("groupId").setText("org.openmrs.module");
        dependency.addElement("artifactId").setText("metadtamapiing");
        dependency.addElement("version").setText("2345");

        assertThat(target.getRootElement().element("dependencies").element("dependency"), is(nullValue()));

        helper.applyModifications(modifications.getRootElement(), target.getRootElement());

        assertThat(target.getRootElement().element("dependencies").element("dependency"), is(notNullValue()));
        assertThat(target.getRootElement().element("dependencies").element("dependency").element("groupId").getText(), is("org.openmrs.module"));
    }