Request request = new Request(Method.POST, resourceRef);
request.setEntity(
JsonParameters.JSON_PARAMETERS + "=" + ClusterRepresentationUtil.ObjectToJson(paramMap),
MediaType.APPLICATION_ALL);
Response response = _gClient.handle(request);
Representation result = response.getEntity();
StringWriter sw = new StringWriter();
result.write(sw);
System.out.println(sw.toString());
// verify pause znode exists
String pausePath = PropertyPathConfig.getPath(PropertyType.PAUSE, clusterName);
System.out.println("pausePath: " + pausePath);
boolean exists = _gZkClient.exists(pausePath);
Assert.assertTrue(exists, pausePath + " should exist");
// Then enable it
paramMap.put(JsonParameters.ENABLED, "" + true);
request = new Request(Method.POST, resourceRef);
request.setEntity(
JsonParameters.JSON_PARAMETERS + "=" + ClusterRepresentationUtil.ObjectToJson(paramMap),
MediaType.APPLICATION_ALL);
response = _gClient.handle(request);
result = response.getEntity();
sw = new StringWriter();
result.write(sw);
System.out.println(sw.toString());