@Test(timeout=30000)
public void testReleaseVolumeRefIfNoBlockScanner() throws IOException {

  FsVolumeList volumeList = new FsVolumeList(
      Collections.<VolumeFailureInfo>emptyList(), null, blockChooser);
  File volDir = new File(baseDir, "volume-0");
  volDir.mkdirs();
  FsVolumeImpl volume = new FsVolumeImplBuilder()
      .setConf(conf)
      .setDataset(dataset)
      .setStorageID("storage-id")
      .setStorageDirectory(
          new StorageDirectory(StorageLocation.parse(volDir.getPath())))
      .build();
  FsVolumeReference ref = volume.obtainReference();
  volumeList.addVolume(ref);
  assertNull(ref.getVolume());
}