### Question:
HopRow implements Serializable { @Override public boolean equals( Object obj ) { if (!(obj instanceof HopRow )) { return false; } if (this == obj) { return true; } HopRow otherHopRow = (HopRow) obj; Object[] thisRow = row; Object[] otherRow = otherHopRow.getRow(); if (thisRow==null && otherRow==null) { return true; } if ( (thisRow==null && otherRow!=null) || (thisRow!=null && otherRow==null)) { return false; } if (thisRow.length!=otherRow.length) { return false; } for (int i=0;i<thisRow.length;i++) { Object thisValue = thisRow[i]; Object otherValue = otherRow[i]; if ((thisValue==null && otherValue!=null ) || (thisValue!=null && otherValue==null)) { return false; } if (thisValue!=null && otherValue!=null && !thisValue.equals( otherValue )) { return false; } } return true; } HopRow();  HopRow( Object[] row ); @Override boolean equals( Object obj ); @Override int hashCode(); boolean allNull(); Object[] getRow(); void setRow( Object[] row );  }### Answer:
@Test public void equalsTest() { Object[] row1 = new Object[] { "AAA", "BBB", Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; Object[] row2 = new Object[] { "AAA", "BBB", Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; HopRow hopRow1 = new HopRow(row1); HopRow hopRow2 = new HopRow(row2); assertTrue(hopRow1.equals( hopRow2 )); Object[] row3 = new Object[] { "AAA", "BBB", Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; Object[] row4 = new Object[] { "AAA", "CCC", Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; HopRow hopRow3 = new HopRow(row3); HopRow hopRow4 = new HopRow(row4); assertFalse(hopRow3.equals( hopRow4 )); Object[] row5 = new Object[] { "AAA", null, Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; Object[] row6 = new Object[] { "AAA", null, Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; HopRow hopRow5 = new HopRow(row5); HopRow hopRow6 = new HopRow(row6); assertTrue(hopRow5.equals( hopRow6 )); Object[] row7 = new Object[] { "AAA", "BBB", Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; Object[] row8 = new Object[] { "AAA", null, Long.valueOf( 100 ), Double.valueOf(1.234), new Date( 876876868 ) }; HopRow hopRow7 = new HopRow(row7); HopRow hopRow8 = new HopRow(row8); assertFalse(hopRow7.equals( hopRow8 )); }