private static String toCsv(List<String> list) {
        StringBuilder sb = new StringBuilder();

        for (String item : list) {
            sb.append(String.format("%s,", item));
        }

        sb.deleteCharAt(sb.length() - 1);

        return sb.toString();
    }
{
  "RequestInfo" : {
    "query":"Hosts/host_name.in(host1,host2)"
  },
  "Body" : {
    "host_components": [
    {
      "HostRoles" : { "component_name" : "HIVE_CLIENT" }
    },
    {
      "HostRoles" : { "component_name" : "TEZ_CLIENT" }
    }
    ]
}
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/api/servicecomponenthost/BulkAddServiceComponentHostsWebRequest.java