@Test
public void testAbandon() throws Exception {
NameNode nn = cluster.getNameNode();
DistributedFileSystem fs = (DistributedFileSystem) cluster.getFileSystem();
String fileName = "/testAbandon";
fs.create(new Path(fileName));
LocatedBlock lbk = nn.addBlock(fileName, fs.getClient().getClientName());
INodeFileUnderConstruction cons = (INodeFileUnderConstruction) nn.namesystem.dir
.getINode(fileName);
cons.setTargets(null, -1);
nn.abandonBlock(lbk.getBlock(), fileName, fs.getClient().getClientName());