@Test
public void testToDatanodeInfoWithoutSecurePort() throws Exception {

  Map<String, Object> response = new HashMap<String, Object>();
  
  response.put("ipAddr", "127.0.0.1");
  response.put("hostName", "localhost");
  response.put("storageID", "fake-id");
  response.put("xferPort", 1337l);
  response.put("infoPort", 1338l);
  // deliberately don't include an entry for "infoSecurePort"
  response.put("ipcPort", 1339l);
  response.put("capacity", 1024l);
  response.put("dfsUsed", 512l);
  response.put("remaining", 512l);
  response.put("blockPoolUsed", 512l);
  response.put("lastUpdate", 0l);
  response.put("xceiverCount", 4096l);
  response.put("networkLocation", "foo.bar.baz");
  response.put("adminState", "NORMAL");
  response.put("cacheCapacity", 123l);
  response.put("cacheUsed", 321l);
  
  JsonUtil.toDatanodeInfo(response);
}