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

    PomAddProperty pomAddProperty = new PomAddProperty("encoding", "bar").relative("pom.xml").warnNotAddIfPresent();
    TOExecutionResult executionResult = pomAddProperty.execution(transformedAppFolder, transformationContext);
    assertEqualsXml("pom.xml");
    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 not added to POM file pom.xml because it is already present");
IXME
ncomment this when STAX based version of this TO is implemented
      assertNotChangedFile("pom.xml");
}