@Test
public void testGetDatanodeByHost() throws Exception {

  assertEquals(map.getDatanodeByHost("1.1.1.1"), dataNodes[0]);
  assertEquals(map.getDatanodeByHost("2.2.2.2"), dataNodes[1]);
  DatanodeDescriptor node = map.getDatanodeByHost("3.3.3.3");
  assertTrue(node == dataNodes[2] || node == dataNodes[3]);
  assertNull(map.getDatanodeByHost("4.4.4.4"));
}