### Question:
HeapPageId implements PageId { public int hashCode() { return (tableId+"_"+pageNum).hashCode(); } HeapPageId(int tableId, int pgNo); int getTableId(); int pageNumber(); int hashCode(); boolean equals(Object o); int[] serialize();  }### Answer:
@Test public void testHashCode() { int code1, code2; pid = new HeapPageId(1, 1); code1 = pid.hashCode(); assertEquals(code1, pid.hashCode()); assertEquals(code1, pid.hashCode()); pid = new HeapPageId(2, 2); code2 = pid.hashCode(); assertEquals(code2, pid.hashCode()); assertEquals(code2, pid.hashCode()); }