@Test public void testEquals() { SingleOrMultipleTaskOutput output = mock(SingleOrMultipleTaskOutput.class); MultiplePdfSourceMultipleOutputParameters eq1 = new MultiplePdfSourceMultipleOutputParameters(); eq1.setOutput(output); MultiplePdfSourceMultipleOutputParameters eq2 = new MultiplePdfSourceMultipleOutputParameters(); eq2.setOutput(output); MultiplePdfSourceMultipleOutputParameters eq3 = new MultiplePdfSourceMultipleOutputParameters(); eq3.setOutput(output); MultiplePdfSourceMultipleOutputParameters diff = new MultiplePdfSourceMultipleOutputParameters(); diff.setOutput(mock(SingleOrMultipleTaskOutput.class)); TestUtils.testEqualsAndHashCodes(eq1, eq2, eq3, diff); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MultiplePdfSourceMultipleOutputParameters)) { return false; } MultiplePdfSourceMultipleOutputParameters parameter = (MultiplePdfSourceMultipleOutputParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(outputPrefix, parameter.outputPrefix) .append(output, parameter.output).append(specificResultFilenames, parameter.specificResultFilenames) .isEquals(); }
MultiplePdfSourceMultipleOutputParameters extends MultiplePdfSourceParameters implements SingleOrMultipleOutputTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MultiplePdfSourceMultipleOutputParameters)) { return false; } MultiplePdfSourceMultipleOutputParameters parameter = (MultiplePdfSourceMultipleOutputParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(outputPrefix, parameter.outputPrefix) .append(output, parameter.output).append(specificResultFilenames, parameter.specificResultFilenames) .isEquals(); } }
MultiplePdfSourceMultipleOutputParameters extends MultiplePdfSourceParameters implements SingleOrMultipleOutputTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MultiplePdfSourceMultipleOutputParameters)) { return false; } MultiplePdfSourceMultipleOutputParameters parameter = (MultiplePdfSourceMultipleOutputParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(outputPrefix, parameter.outputPrefix) .append(output, parameter.output).append(specificResultFilenames, parameter.specificResultFilenames) .isEquals(); }  }
MultiplePdfSourceMultipleOutputParameters extends MultiplePdfSourceParameters implements SingleOrMultipleOutputTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MultiplePdfSourceMultipleOutputParameters)) { return false; } MultiplePdfSourceMultipleOutputParameters parameter = (MultiplePdfSourceMultipleOutputParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(outputPrefix, parameter.outputPrefix) .append(output, parameter.output).append(specificResultFilenames, parameter.specificResultFilenames) .isEquals(); }  @Override String getOutputPrefix(); @Override void setOutputPrefix(String outputPrefix); @Override SingleOrMultipleTaskOutput getOutput(); @Override void setOutput(SingleOrMultipleTaskOutput output); void addSpecificResultFilename(String filename); void addSpecificResultFilenames(Collection<String> filenames); List<String> getSpecificResultFilenames(); String getSpecificResultFilename(int fileNumber); String getSpecificResultFilename(int fileNumber, String expectedExtension); @Override int hashCode(); @Override boolean equals(Object other); }
MultiplePdfSourceMultipleOutputParameters extends MultiplePdfSourceParameters implements SingleOrMultipleOutputTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MultiplePdfSourceMultipleOutputParameters)) { return false; } MultiplePdfSourceMultipleOutputParameters parameter = (MultiplePdfSourceMultipleOutputParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(outputPrefix, parameter.outputPrefix) .append(output, parameter.output).append(specificResultFilenames, parameter.specificResultFilenames) .isEquals(); }  @Override String getOutputPrefix(); @Override void setOutputPrefix(String outputPrefix); @Override SingleOrMultipleTaskOutput getOutput(); @Override void setOutput(SingleOrMultipleTaskOutput output); void addSpecificResultFilename(String filename); void addSpecificResultFilenames(Collection<String> filenames); List<String> getSpecificResultFilenames(); String getSpecificResultFilename(int fileNumber); String getSpecificResultFilename(int fileNumber, String expectedExtension); @Override int hashCode(); @Override boolean equals(Object other);  }