BlockInfo extends Block implements LightWeightGSet.LinkedElement { public boolean isDeleted() { return bcId == INVALID_INODE_ID; } BlockInfo(short size);  BlockInfo(Block blk, short size); short getReplication(); void setReplication(short repl); long getBlockCollectionId(); void setBlockCollectionId(long id); boolean isDeleted(); DatanodeDescriptor getDatanode(int index); int getCapacity(); abstract int numNodes(); abstract boolean isStriped(); BlockInfo moveBlockToHead(BlockInfo head, DatanodeStorageInfo storage,
      int curIndex, int headIndex); @Override int hashCode(); @Override boolean equals(Object obj); @Override LightWeightGSet.LinkedElement getNext(); @Override void setNext(LightWeightGSet.LinkedElement next); BlockUnderConstructionFeature getUnderConstructionFeature(); BlockUCState getBlockUCState(); boolean isComplete(); void convertToBlockUnderConstruction(BlockUCState s,
      DatanodeStorageInfo[] targets); void setGenerationStampAndVerifyReplicas(long genStamp); static final BlockInfo[] EMPTY_ARRAY; }
@Test public void testIsDeleted() { BlockInfo blockInfo = new BlockInfoContiguous((short) 3); BlockCollection bc = Mockito.mock(BlockCollection.class); blockInfo.setBlockCollectionId(1000); Assert.assertFalse(blockInfo.isDeleted()); blockInfo.setBlockCollectionId(INVALID_INODE_ID); Assert.assertTrue(blockInfo.isDeleted()); }