PdfToJpegParameters extends AbstractPdfToMultipleImageParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof PdfToJpegParameters)) { return false; } PdfToJpegParameters parameter = (PdfToJpegParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(quality, parameter.quality).isEquals(); } PdfToJpegParameters(ImageColorType type); @Override ImageType getOutputImageType(); int getQuality(); void setQuality(int quality); @Override int hashCode(); @Override boolean equals(Object other);  }
@Test public void testEquals() { PdfToJpegParameters eq1 = new PdfToJpegParameters(ImageColorType.COLOR_RGB); PdfToJpegParameters eq2 = new PdfToJpegParameters(ImageColorType.COLOR_RGB); PdfToJpegParameters eq3 = new PdfToJpegParameters(ImageColorType.COLOR_RGB); PdfToJpegParameters diff = new PdfToJpegParameters(ImageColorType.COLOR_RGB); diff.setResolutionInDpi(120); TestUtils.testEqualsAndHashCodes(eq1, eq2, eq3, diff); }