@Test
public void propertyAlreadyPresentOverwriteWarnTest() throws IOException, SAXException, ParserConfigurationException, XmlPullParserException {

    PomAddProperty pomAddProperty = new PomAddProperty("encoding", "bar").relative("pom.xml").warnButAddIfPresent();
    TOExecutionResult executionResult = pomAddProperty.execution(transformedAppFolder, transformationContext);
    assertEquals(executionResult.getType(), TOExecutionResult.Type.WARNING);
    assertNull(executionResult.getException());
    assertNotNull(executionResult.getWarnings());
    assertEquals(executionResult.getWarnings().size(), 1);
    assertEquals(executionResult.getWarnings().get(0).getClass(), TransformationOperationException.class);
    assertEquals(executionResult.getWarnings().get(0).getMessage(), "Property encoding was already present in POM file pom.xml, but it was overwritten to bar");
    Model pomModelAfterChange = getTransformedPomModel("pom.xml");
    assertEquals(pomModelAfterChange.getProperties().size(), 1);
    assertEquals(pomModelAfterChange.getProperties().getProperty("encoding"), "bar");
IXME
ncomment this when STAX based version of this TO is implemented
      assertNotChangedFile("pom.xml");
}