UberfireDock { @Override public int hashCode() { int result = placeRequest.hashCode(); result = 31 * result + (uberfireDockPosition != null ? uberfireDockPosition.hashCode() : 0); result = ~~result; result = 31 * result + (iconType != null ? iconType.hashCode() : 0); result = ~~result; result = 31 * result + (imageIcon != null ? imageIcon.hashCode() : 0); result = ~~result; result = 31 * result + (imageIconFocused != null ? imageIconFocused.hashCode() : 0); result = ~~result; result = 31 * result + (associatedPerspective != null ? associatedPerspective.hashCode() : 0); result = ~~result; result = 31 * result + (size != null ? size.hashCode() : 0); result = ~~result; result = 31 * result + (label != null ? label.hashCode() : 0); result = ~~result; result = 31 * result + (tooltip != null ? tooltip.hashCode() : 0); result = ~~result; return result; } 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 testTestHashCode() { 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(DOCK_POSITION, ICON_TYPE, new DefaultPlaceRequest(SCREEN_ID), PERSPECTIVE_ID) .withLabel(null); assertEquals(tested.hashCode(), compareDock1.hashCode()); assertNotSame(tested.hashCode(), compareDock2.hashCode()); assertNotSame(tested.hashCode(), compareDock3.hashCode()); assertNotSame(tested.hashCode(), compareDock4.hashCode()); assertNotSame(tested.hashCode(), compareDock5.hashCode()); assertNotSame(compareDock1.hashCode(), compareDock2.hashCode()); assertNotSame(compareDock1.hashCode(), compareDock3.hashCode()); assertNotSame(compareDock1.hashCode(), compareDock4.hashCode()); assertNotSame(compareDock1.hashCode(), compareDock5.hashCode()); assertNotSame(compareDock2.hashCode(), compareDock3.hashCode()); assertNotSame(compareDock2.hashCode(), compareDock4.hashCode()); assertNotSame(compareDock2.hashCode(), compareDock5.hashCode()); assertNotSame(compareDock3.hashCode(), compareDock4.hashCode()); assertNotSame(compareDock3.hashCode(), compareDock5.hashCode()); assertNotSame(compareDock4.hashCode(), compareDock5.hashCode()); }