@Test
public void testCheckAvailability()
    throws IOException {

  conf.setLong(DFSConfigKeys.DFS_NAMENODE_DU_RESERVED_KEY, 0);
  NameNodeResourceChecker nb = new NameNodeResourceChecker(conf);
  assertTrue(
      "isResourceAvailable must return true if " +
          "disk usage is lower than threshold",
      nb.hasAvailableDiskSpace());
}