MultiplePdfSourceSingleOutputParameters extends MultiplePdfSourceParameters implements SingleOutputTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MultiplePdfSourceSingleOutputParameters)) { return false; } MultiplePdfSourceSingleOutputParameters parameter = (MultiplePdfSourceSingleOutputParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(output, parameter.output).isEquals(); }  @Override SingleTaskOutput getOutput(); @Override void setOutput(SingleTaskOutput output); @Override int hashCode(); @Override boolean equals(Object other);  }
@Test public void testEquals() { SingleTaskOutput output = mock(SingleTaskOutput.class); MockMultiplePdfSourceSingleOutputParameters eq1 = new MockMultiplePdfSourceSingleOutputParameters(); eq1.setOutput(output); MockMultiplePdfSourceSingleOutputParameters eq2 = new MockMultiplePdfSourceSingleOutputParameters(); eq2.setOutput(output); MockMultiplePdfSourceSingleOutputParameters eq3 = new MockMultiplePdfSourceSingleOutputParameters(); eq3.setOutput(output); MockMultiplePdfSourceSingleOutputParameters diff = new MockMultiplePdfSourceSingleOutputParameters(); diff.setOutput(mock(SingleTaskOutput.class)); TestUtils.testEqualsAndHashCodes(eq1, eq2, eq3, diff); }