ExtendedBlock { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ExtendedBlock)) { return false; } ExtendedBlock b = (ExtendedBlock)o; return b.block.equals(block) && b.poolId.equals(poolId); } 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);  ExtendedBlock(final String poolId, final long blkid, final long sid, 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 testEquals() { assertEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1), new ExtendedBlock(POOL_A, BLOCK_1_GS1)); assertNotEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1), new ExtendedBlock(POOL_B, BLOCK_1_GS1)); assertNotEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1), new ExtendedBlock(POOL_A, BLOCK_2_GS1)); assertEquals( new ExtendedBlock(POOL_A, BLOCK_1_GS1), new ExtendedBlock(POOL_A, BLOCK_1_GS2)); }