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); void delete(); boolean isDeleted(); Iterator<DatanodeStorageInfo> getStorageInfos(); DatanodeDescriptor getDatanode(int index); int getCapacity(); abstract int numNodes(); abstract boolean isStriped(); abstract BlockType getBlockType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override LightWeightGSet.LinkedElement getNext(); @Override void setNext(LightWeightGSet.LinkedElement next); BlockUnderConstructionFeature getUnderConstructionFeature(); BlockUCState getBlockUCState(); boolean isComplete(); boolean isUnderRecovery(); final boolean isCompleteOrCommitted(); void convertToBlockUnderConstruction(BlockUCState s,
      DatanodeStorageInfo[] targets); List<ReplicaUnderConstruction> 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()); }