@Test
public void testGetNameServiceIds() {

  HdfsConfiguration conf = new HdfsConfiguration();
  conf.set(DFS_NAMESERVICES, "nn1,nn2");
  Collection<String> nameserviceIds = DFSUtil.getNameServiceIds(conf);
  Iterator<String> it = nameserviceIds.iterator();
  assertEquals(2, nameserviceIds.size());
  assertEquals("nn1", it.next().toString());
  assertEquals("nn2", it.next().toString());
}