UberfireDock { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UberfireDock that = (UberfireDock) o; return Objects.equals(uberfireDockPosition, that.uberfireDockPosition) && Objects.equals(iconType, that.iconType) && Objects.equals(imageIcon, that.imageIcon) && Objects.equals(imageIconFocused, that.imageIconFocused) && Objects.equals(placeRequest, that.placeRequest) && Objects.equals(associatedPerspective, that.associatedPerspective) && Objects.equals(size, that.size) && Objects.equals(label, that.label) && Objects.equals(tooltip, that.tooltip); } UberfireDock(UberfireDockPosition uberfireDockPosition,
                        String iconType,
                        PlaceRequest placeRequest,
                        String associatedPerspective);  UberfireDock(UberfireDockPosition uberfireDockPosition,
                        String iconType,
                        PlaceRequest placeRequest);  UberfireDock(UberfireDockPosition uberfireDockPosition,
                        ImageResource imageIcon,
                        ImageResource imageIconFocused,
                        PlaceRequest placeRequest,
                        String associatedPerspective);  UberfireDock(UberfireDockPosition uberfireDockPosition,
                        ImageResource imageIcon,
                        ImageResource imageIconFocused,
                        PlaceRequest placeRequest); UberfireDock withLabel(String label); UberfireDock withTooltip(String tooltip); UberfireDock withSize(double size); void setUberfireDockPosition(UberfireDockPosition uberfireDockPosition); String getAssociatedPerspective(); String getIdentifier(); PlaceRequest getPlaceRequest(); UberfireDockPosition getDockPosition(); Double getSize(); String getLabel(); String getTooltip(); String getIconType(); ImageResource getImageIcon(); ImageResource getImageIconFocused(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() { UberfireDock compareDock1 = new UberfireDock(DOCK_POSITION, ICON_TYPE, new DefaultPlaceRequest(SCREEN_ID), PERSPECTIVE_ID) .withSize(SIZE) .withLabel(LABEL) .withTooltip(TOOLTIP); UberfireDock compareDock2 = new UberfireDock(DOCK_POSITION, imageIcon1, imageIconFocused1, new DefaultPlaceRequest(SCREEN_ID), PERSPECTIVE_ID) .withSize(SIZE) .withLabel(LABEL) .withTooltip(TOOLTIP); UberfireDock compareDock3 = new UberfireDock(null, null, new DefaultPlaceRequest(SCREEN_ID)); UberfireDock compareDock4 = new UberfireDock(null, null, null, new DefaultPlaceRequest(SCREEN_ID)); UberfireDock compareDock5 = new UberfireDock(UberfireDockPosition.WEST, ICON_TYPE + "EXTRA", new DefaultPlaceRequest(SCREEN_ID + "EXTRA"), PERSPECTIVE_ID + "EXTRA") .withSize(SIZE + 20) .withLabel(LABEL + "EXTRA") .withTooltip(TOOLTIP + "EXTRA"); UberfireDock compareDock6 = new UberfireDock(UberfireDockPosition.WEST, imageIcon2, imageIconFocused2, new DefaultPlaceRequest(SCREEN_ID + "EXTRA"), PERSPECTIVE_ID + "EXTRA") .withSize(SIZE + 20) .withLabel(LABEL + "EXTRA") .withTooltip(TOOLTIP + "EXTRA"); assertEquals(tested, tested); assertEquals(tested, compareDock1); assertNotEquals(null, tested); assertNotEquals(tested, new Object()); assertNotEquals(tested, compareDock2); assertNotEquals(tested, compareDock3); assertNotEquals(tested, compareDock4); assertNotEquals(tested, compareDock5); assertNotEquals(tested, compareDock6); assertNotEquals(compareDock1, compareDock2); assertNotEquals(compareDock1, compareDock3); assertNotEquals(compareDock1, compareDock4); assertNotEquals(compareDock1, compareDock5); assertNotEquals(compareDock1, compareDock6); assertNotEquals(compareDock2, compareDock3); assertNotEquals(compareDock2, compareDock4); assertNotEquals(compareDock2, compareDock5); assertNotEquals(compareDock2, compareDock6); assertEquals(compareDock3, compareDock4); assertNotEquals(compareDock3, compareDock5); assertNotEquals(compareDock3, compareDock6); assertNotEquals(compareDock4, compareDock5); assertNotEquals(compareDock4, compareDock6); assertNotEquals(compareDock5, compareDock6); }