ViewerPreferencesParameters extends MultiplePdfSourceMultipleOutputParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof ViewerPreferencesParameters)) { return false; } ViewerPreferencesParameters parameter = (ViewerPreferencesParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)).append(printScaling, parameter.getPrintScaling()) .append(direction, parameter.getDirection()).append(duplex, parameter.getDuplex()) .append(pageLayout, parameter.getPageLayout()).append(pageMode, parameter.getPageMode()) .append(nfsMode, parameter.getNfsMode()) .append(enabledBooleanPreferences, parameter.getEnabledPreferences()).isEquals(); }  boolean addEnabledPreference(PdfBooleanPreference e); void clearEnabledPreferences(); PdfPageMode getPageMode(); void setPageMode(PdfPageMode pageMode); PdfPageLayout getPageLayout(); void setPageLayout(PdfPageLayout pageLayout); PdfNonFullScreenPageMode getNfsMode(); void setNfsMode(PdfNonFullScreenPageMode nfsMode); PdfDuplex getDuplex(); void setDuplex(PdfDuplex duplex); PdfDirection getDirection(); void setDirection(PdfDirection direction); PdfPrintScaling getPrintScaling(); void setPrintScaling(PdfPrintScaling printScaling); Set<PdfBooleanPreference> getEnabledPreferences(); @Override PdfVersion getMinRequiredPdfVersion(); @Override int hashCode(); @Override boolean equals(Object other);  }
@Test public void testEquals() { ViewerPreferencesParameters eq1 = new ViewerPreferencesParameters(); ViewerPreferencesParameters eq2 = new ViewerPreferencesParameters(); ViewerPreferencesParameters eq3 = new ViewerPreferencesParameters(); ViewerPreferencesParameters diff = new ViewerPreferencesParameters(); diff.addEnabledPreference(PdfBooleanPreference.HIDE_MENUBAR); TestUtils.testEqualsAndHashCodes(eq1, eq2, eq3, diff); }