PomRemoveDependency extends AbstractArtifactPomOperation<PomRemoveDependency> implements ChangeOrRemoveElement<PomRemoveDependency> { @Override public PomRemoveDependency warnIfNotPresent() { ifNotPresent = IfNotPresent.Warn; return this; } PomRemoveDependency();  PomRemoveDependency(String groupId, String artifactId); @Override PomRemoveDependency failIfNotPresent(); @Override PomRemoveDependency warnIfNotPresent(); @Override PomRemoveDependency noOpIfNotPresent(); @Override String getDescription(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void warnNotPresentTest() throws IOException, XmlPullParserException { PomRemoveDependency uut = new PomRemoveDependency("com.test", "not-present").relative("pom.xml").warnIfNotPresent(); assertNull(getDependencyBeforeChange(uut)); TOExecutionResult executionResult = uut.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_NOT_REMOVED_MSG); }