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