MultiSelectColumnDescriptor implements ColumnDescriptor { @Override public boolean equals(final Object object) { if (this == object) { return true; } if (object == null) { return false; } if (getClass() != object.getClass()) { return false; } MultiSelectColumnDescriptor other = (MultiSelectColumnDescriptor) object; return other.table == table; } MultiSelectColumnDescriptor(); @Override void renderValue(final StringOutput sb, final int row, final Renderer renderer); @Override int compareTo(final int rowa, final int rowb); @Override boolean equals(final Object object); @Override int hashCode(); @Override String getHeaderKey(); @Override boolean translateHeaderKey(); @Override int getAlignment(); @Override String getAction(final int row); @Override HrefGenerator getHrefGenerator(); @Override String getPopUpWindowAttributes(); @Override boolean isPopUpWindowAction(); @Override boolean isSortingAllowed(); @Override void modelChanged(); @Override void otherColumnDescriptorSorted(); @Override void setHrefGenerator(final HrefGenerator h); @Override void setTable(final Table table); @Override void sortingAboutToStart(); @Override String toString(final int rowid);  }
@Test public void testEqualsContract() { assertFalse("Wrong equals implementation, different types are recognized as equals ", one.equals(new Integer(1))); assertFalse("Wrong equals implementation, different objects are recognized as equals ", one.equals(two)); assertFalse("Wrong equals implementation, null value is recognized as equals ", one.equals(null)); assertTrue("Wrong equals implementation, same objects are NOT recognized as equals ", one.equals(sameRefAsOne)); assertTrue("Wrong equals implementation, same objecst are NOT recognized as equals ", one.equals(sameAsOne)); }