@Test
public void testGetInfoServer() throws IOException, URISyntaxException {

  HdfsConfiguration conf = new HdfsConfiguration();
  
  URI httpsport = DFSUtil.getInfoServer(null, conf, "https");
  assertEquals(new URI("https", null, "0.0.0.0",
      DFS_NAMENODE_HTTPS_PORT_DEFAULT, null, null, null), httpsport);
  
  URI httpport = DFSUtil.getInfoServer(null, conf, "http");
  assertEquals(new URI("http", null, "0.0.0.0",
      DFS_NAMENODE_HTTP_PORT_DEFAULT, null, null, null), httpport);
  URI httpAddress = DFSUtil.getInfoServer(new InetSocketAddress(
      "localhost", 8020), conf, "http");
  assertEquals(
      URI.create("http://localhost:" + DFS_NAMENODE_HTTP_PORT_DEFAULT),
      httpAddress);
}