@Test
public void warningNotPresentTest() {

    PomReplaceDependency pomReplaceDependency = new PomReplaceDependency("foo", "bar", "newfoo", "newbar").relative("pom.xml").warnIfNotPresent();
    TOExecutionResult executionResult = pomReplaceDependency.execution(transformedAppFolder, transformationContext);
    assertEquals(executionResult.getType(), TOExecutionResult.Type.WARNING);
    assertNull(executionResult.getException());
    assertEquals(executionResult.getWarnings().get(0).getClass(), TransformationOperationException.class);
    assertEquals(executionResult.getWarnings().get(0).getMessage(), "Dependency foo:bar has not been replaced by newfoo:newbar in POM file /pom.xml because it is not present");
IXME
ncomment this when STAX based version of this TO is implemented
      assertNotChangedFile("pom.xml");
}