@Test
public void testParseURL() throws IoTDBURLException {

  String userName = "test";
  String userPwd = "test";
  String host1 = "localhost";
  int port = 6667;
  Properties properties = new Properties();
  properties.setProperty(Config.AUTH_USER, userName);
  properties.setProperty(Config.AUTH_PASSWORD, userPwd);
  IoTDBConnectionParams params = Utils
      .parseUrl(String.format(Config.IOTDB_URL_PREFIX + "%s:%s/", host1, port),
          properties);
  assertEquals(host1, params.getHost());
  assertEquals(port, params.getPort());
  assertEquals(userName, params.getUsername());
  assertEquals(userPwd, params.getPassword());
  params = Utils.parseUrl(String.format(Config.IOTDB_URL_PREFIX + "%s:%s", host1, port), properties);
  assertEquals(params.getHost(), host1);
  assertEquals(params.getPort(), port);
  assertEquals(params.getUsername(), userName);
  assertEquals(params.getPassword(), userPwd);
}