@Test
public void testParseNameNodes() throws Exception {

  final String expectedServiceName = "serviceOne";
  Map<String, String> hdfsSiteConfigMap =
    new HashMap<String, String>();
  hdfsSiteConfigMap.put("dfs.ha.namenodes." + expectedServiceName, "node1");
  // verify that a single name node is parsed correctly
  String[] result =
    BlueprintConfigurationProcessor.parseNameNodes(expectedServiceName, hdfsSiteConfigMap);
  assertNotNull("Resulting array was null",
    result);
  assertEquals("Incorrect array size",
    1, result.length);
  assertEquals("Incorrect value for returned name nodes",
    "node1", result[0]);
  // verify that multiple name nodes are parsed correctly
  hdfsSiteConfigMap.put("dfs.ha.namenodes." + expectedServiceName, " nodeSeven, nodeEight, nodeNine");
  String[] resultTwo =
    BlueprintConfigurationProcessor.parseNameNodes(expectedServiceName, hdfsSiteConfigMap);
  assertNotNull("Resulting array was null",
    resultTwo);
  assertEquals("Incorrect array size",
    3, resultTwo.length);
  assertEquals("Incorrect value for returned name node",
    "nodeSeven", resultTwo[0]);
  assertEquals("Incorrect value for returned name node",
    "nodeEight", resultTwo[1]);
  assertEquals("Incorrect value for returned name node",
    "nodeNine", resultTwo[2]);
}