PomRemoveProperty extends AbstractPomOperation<PomRemoveProperty> implements ChangeOrRemoveElement<PomRemoveProperty> { @Override public PomRemoveProperty failIfNotPresent() { ifNotPresent = IfNotPresent.Fail; return this; } PomRemoveProperty();  PomRemoveProperty(String propertyName); PomRemoveProperty setPropertyName(String propertyName); @Override PomRemoveProperty failIfNotPresent(); @Override PomRemoveProperty warnIfNotPresent(); @Override PomRemoveProperty noOpIfNotPresent(); String getPropertyName(); @Override String getDescription();  }
@Test public void propertyNotPresentErrorTest() throws IOException { PomRemoveProperty pomRemoveProperty = new PomRemoveProperty("zoo").relative("pom.xml").failIfNotPresent(); TOExecutionResult executionResult = pomRemoveProperty.execution(transformedAppFolder, transformationContext); assertEquals(executionResult.getType(), TOExecutionResult.Type.ERROR); assertEquals(executionResult.getException().getClass(), TransformationOperationException.class); assertEquals(executionResult.getException().getMessage(), "Property zoo has not been removed from POM file /pom.xml because it is not present"); assertNull(executionResult.getException().getCause()); assertNull(executionResult.getDetails()); assertNotChangedFile("pom.xml"); assertEquals(new PomRemoveProperty("zoo").relative("pom.xml").execution(transformedAppFolder, transformationContext).getType(), TOExecutionResult.Type.ERROR); }