/**
   * Tests for empty configuration, an exception is thrown from {@link
   * DFSUtil#getNNServiceRpcAddresses(Configuration)} {@link
   * DFSUtil#getBackupNodeAddresses(Configuration)} {@link
   * DFSUtil#getSecondaryNameNodeAddresses(Configuration)}
   */
  @Test
  public void testEmptyConf() {
    HdfsConfiguration conf = new HdfsConfiguration(false);
    try {
      Map<String, Map<String, InetSocketAddress>> map = DFSUtil.getNNServiceRpcAddresses(conf);
      fail("Expected IOException is not thrown, result was: " + DFSUtil.addressMapToString(map));
    } catch (IOException expected) {
      /** Expected */
    }

    try {
      Map<String, Map<String, InetSocketAddress>> map = DFSUtil.getBackupNodeAddresses(conf);
      fail("Expected IOException is not thrown, result was: " + DFSUtil.addressMapToString(map));
    } catch (IOException expected) {
      /** Expected */
    }

    try {
      Map<String, Map<String, InetSocketAddress>> map = DFSUtil.getSecondaryNameNodeAddresses(conf);
      fail("Expected IOException is not thrown, result was: " + DFSUtil.addressMapToString(map));
    } catch (IOException expected) {
      /** Expected */
    }
  }