TransformationUtility implements Cloneable { @Override @SuppressWarnings("PMD.SimplifyBooleanReturns") public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof TransformationUtility)) return false; TransformationUtility tu = (TransformationUtility) obj; if (!Objects.equals(this.abortionMessage, tu.abortionMessage)) return false; if (this.abortOnFailure != tu.abortOnFailure) return false; if (!Objects.equals(this.absoluteFile, tu.absoluteFile)) return false; if (!Objects.equals(this.absoluteFileFromContextAttribute, tu.absoluteFileFromContextAttribute)) return false; if (!Objects.equals(this.additionalRelativePath, tu.additionalRelativePath)) return false; if (!Objects.equals(this.contextAttributeName, tu.contextAttributeName)) return false; if (!Arrays.equals(this.dependencies, tu.dependencies)) return false; if (!Objects.equals(this.ifConditionAttributeName, tu.ifConditionAttributeName)) return false; if (!Objects.equals(this.latePropertiesAttributes, tu.latePropertiesAttributes)) return false; if (!Objects.equals(this.name, tu.name)) return false; if (this.order != tu.order) return false; if (!Objects.equals(this.parent, tu.parent)) return false; if (!Objects.equals(this.relativePath, tu.relativePath)) return false; if (this.saveResult != tu.saveResult) return false; if (!Objects.equals(this.unlessConditionAttributeName, tu.unlessConditionAttributeName)) return false; if (!Objects.equals(this.utilityCondition, tu.utilityCondition)) return false; return true; } @SuppressWarnings("PMD.UnnecessaryConstructor")  TransformationUtility(); final String getName(); T setContextAttributeName(String contextAttributeName); String getContextAttributeName(); final T setParent(TransformationUtilityParent parent, int order); TransformationUtilityParent getParent(); TransformationTemplate getTransformationTemplate(); abstract String getDescription(); int getOrder(); final T relative(String relativePath); final T set(String propertyName, String contextAttributeName); T absolute(String contextAttributeName); T absolute(String contextAttributeName, String additionalRelativePath); @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") PerformResult perform(File transformedAppFolder, TransformationContext transformationContext); final T abortOnFailure(boolean abort); final T abortOnFailure(String abortionMessage); String getAbortionMessage(); final boolean isAbortOnFailure(); boolean isSaveResult(); final boolean hasBeenPerformed(); final T dependsOn(String... dependencies); final T executeIf(String conditionAttributeName); final T executeIf(UtilityCondition utilityCondition); final T executeUnless(String conditionAttributeName); String getIfConditionAttributeName(); String getUnlessConditionAttributeName(); final boolean isFileSet(); final boolean wasFileExplicitlySet(); @Override String toString(); @Override T clone(); T copy(); @Override @SuppressWarnings("PMD.SimplifyBooleanReturns") boolean equals(Object obj); @Override int hashCode();  }
@Test public void equalsTest() { TransformationUtility tu1 = getNewTestTransformationUtility(); TransformationUtility tu2 = getNewTestTransformationUtility(); assertEquals(tu1, tu2); assertEquals(tu1.relative("pom.xml"), tu1); assertNotEquals(tu1, tu2); assertEquals(tu2.relative("pom.xml"), tu2); assertEquals(tu1, tu2); assertEquals(tu1.setName("TUA"), tu1); assertNotEquals(tu1, tu2); assertEquals(tu2.setName("TUA"), tu2); assertEquals(tu1, tu2); }