### Question:
ReadOnlyRowId extends RowId { @Override public int hashCode() { return getRowNum(); } ReadOnlyRowId(int rowNum); @Override int hashCode(); @Override boolean equals(Object obj); int getRowNum(); @Override String toString();  }### Answer:
@Test public void hashCode_shouldBeEqualToHashCodeOfRowNum() { int rowNum = 1337; ReadOnlyRowId rid = new ReadOnlyRowId(rowNum); Assert.assertEquals(Integer.valueOf(rowNum).hashCode(), rid.hashCode()); }
@Test public void hashCode_shouldBeEqualToHashCodeOfRowNum() { int rowNum = 1337; ReadOnlyRowId rid = new ReadOnlyRowId(rowNum); assertEquals(Integer.valueOf(rowNum).hashCode(), rid.hashCode()); }