@Test
public void testValidHaConfig()  throws IllegalArgumentException {

  // username: hdfsuser
  // password: hdfsuser
  // hadoop.security.authentication: simple
  // dfs.nameservices: hwqe-1425428405
  // fs.default.name:
  // dfs.ha.namenodes.hwqe-1425428405: nn1,nn2
  // dfs.namenode.rpc-address.hwqe-1425428405.nn2: node-2.example.com:8020
  // dfs.namenode.rpc-address.hwqe-1425428405.nn1:  node-1.example.com:8020
  Map<String, String> configs = new HashMap<String, String>();
  configs.put("username", "hdfsuser");
  configs.put("password", "hdfsuser");
  configs.put("hadoop.security.authentication", "simple");
  configs.put("fs.default.name", "hdfs://node-2.example.com:8020");
  configs.put("fs.default.name", "hdfs://hwqe-1425428405");
  configs.put("dfs.nameservices", "hwqe-1425428405");
  configs.put("dfs.client.failover.proxy.provider.hwqe-1425428405",
    "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider");
  configs.put("dfs.ha.namenodes.hwqe-1425428405", "nn1,nn2");
  configs.put("dfs.namenode.rpc-address.hwqe-1425428405.nn1", "node-1.example.com:8020");
  configs.put("dfs.namenode.rpc-address.hwqe-1425428405.nn2", "node-2.example.com:8020");
  HdfsClient.validateConnectionConfigs(configs);
}