PomAddProperty extends AbstractPomOperation<PomAddProperty> implements AddElement<PomAddProperty> { @Override public PomAddProperty noOpIfPresent() { ifPresent = IfPresent.NoOp; return this; } PomAddProperty();  PomAddProperty(String propertyName, String propertyValue); @Override PomAddProperty failIfPresent(); @Override PomAddProperty warnNotAddIfPresent(); @Override PomAddProperty warnButAddIfPresent(); @Override PomAddProperty noOpIfPresent(); @Override PomAddProperty overwriteIfPresent(); PomAddProperty setPropertyName(String propertyName); PomAddProperty setPropertyValue(String propertyValue); String getPropertyName(); String getPropertyValue(); @Override String getDescription(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void propertyAlreadyPresentNoOpTest() throws IOException { PomAddProperty pomAddProperty = new PomAddProperty("encoding", "bar").relative("pom.xml").noOpIfPresent(); TOExecutionResult executionResult = pomAddProperty.execution(transformedAppFolder, transformationContext); assertEquals(executionResult.getType(), TOExecutionResult.Type.NO_OP); assertNull(executionResult.getException()); assertEquals(executionResult.getDetails(), "Property encoding was not added to POM file pom.xml because it is already present"); assertNotChangedFile("pom.xml"); }