@Test
public void testGetHostAndPortFromProperty() {

  String value = null;
  HostAndPort hp = HTTPUtils.getHostAndPortFromProperty(value);
  Assert.assertNull(hp);
  value = "";
  hp = HTTPUtils.getHostAndPortFromProperty(value);
  Assert.assertNull(hp);
  value = "c6401.ambari.apache.org";
  hp = HTTPUtils.getHostAndPortFromProperty(value);
  Assert.assertNull(hp);
  value = "c6401.ambari.apache.org:";
  hp = HTTPUtils.getHostAndPortFromProperty(value);
  Assert.assertNull(hp);
  value = "c6401.ambari.apache.org:50070";
  hp = HTTPUtils.getHostAndPortFromProperty(value);
  Assert.assertEquals(hp.host, "c6401.ambari.apache.org");
  Assert.assertEquals(hp.port, 50070);
  value = "  c6401.ambari.apache.org:50070   ";
  Assert.assertEquals(hp.host, "c6401.ambari.apache.org");
  Assert.assertEquals(hp.port, 50070);
}