public boolean hasExceptions() {
    return !unhealthyDataDirs.isEmpty();
  }
@Test
  public void testHasExceptionsReturnsCorrectValue() {
    AddBlockPoolException e = new AddBlockPoolException();
    assertFalse(e.hasExceptions());

    FsVolumeImpl fakeVol = mock(FsVolumeImpl.class);
    ConcurrentHashMap<FsVolumeSpi, IOException> vols =
        new ConcurrentHashMap<FsVolumeSpi, IOException>();
    vols.put(fakeVol, new IOException("Error 1"));
    e = new AddBlockPoolException(vols);
    assertTrue(e.hasExceptions());
  }