ExtendedBlock { @Override public int hashCode() { return new HashCodeBuilder(31, 17). append(poolId). append(block). toHashCode(); } ExtendedBlock();  ExtendedBlock(final ExtendedBlock b);  ExtendedBlock(final String poolId, final long blockId);  ExtendedBlock(String poolId, Block b);  ExtendedBlock(final String poolId, final long blkid, final long len,
      final long genstamp); String getBlockPoolId(); String getBlockName(); long getNumBytes(); long getBlockId(); long getGenerationStamp(); void setBlockId(final long bid); void setGenerationStamp(final long genStamp); void setNumBytes(final long len); void set(String poolId, Block blk); static Block getLocalBlock(final ExtendedBlock b); Block getLocalBlock(); @Override // Object boolean equals(Object o); @Override // Object int hashCode(); @Override // Object String toString();  }
@Test public void testHashcode() { assertNotEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1).hashCode(), new ExtendedBlock(POOL_B, BLOCK_1_GS1).hashCode()); assertNotEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1).hashCode(), new ExtendedBlock(POOL_A, BLOCK_2_GS1).hashCode()); assertEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1).hashCode(), new ExtendedBlock(POOL_A, BLOCK_1_GS1).hashCode()); }