### Question:
ClusterRestClient extends RestClient implements ClusterClient { @Override public void setClusterConfig(String clusterId, ClusterConfigureRequest clusterConfigureRequest) throws IOException { Preconditions.checkArgument(clusterConfigureRequest != null); HttpPut putRequest = new HttpPut(resolveURL(String.format("/clusters/%s/config", clusterId))); addRequestBody(putRequest, clusterConfigureRequest); CloseableHttpResponse httpResponse = execute(putRequest); try { RestClient.analyzeResponseCode(httpResponse); } finally { httpResponse.close(); } } ClusterRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient);  ClusterRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient, Gson gson); @Override List<ClusterSummary> getClusters(); @Override ClusterDetails getCluster(String clusterId); @Override void deleteCluster(String clusterId); @Override void deleteCluster(String clusterId, ClusterOperationRequest clusterOperationRequest); @Override String createCluster(ClusterCreateRequest clusterCreateRequest); @Override ClusterStatusResponse getClusterStatus(String clusterId); @Override JsonObject getClusterConfig(String clusterId); @Override void setClusterConfig(String clusterId, ClusterConfigureRequest clusterConfigureRequest); @Override List<String> getClusterServices(String clusterId); @Override void syncClusterTemplate(String clusterId); @Override void setClusterExpireTime(String clusterId, long expireTime); @Override void startServiceOnCluster(String clusterId, String serviceId); @Override void startServiceOnCluster(String clusterId, String serviceId,
                                    ClusterOperationRequest clusterOperationRequest); @Override void stopServiceOnCluster(String clusterId, String serviceId); @Override void stopServiceOnCluster(String clusterId, String serviceId, ClusterOperationRequest clusterOperationRequest); @Override void restartServiceOnCluster(String clusterId, String serviceId); @Override void restartServiceOnCluster(String clusterId, String serviceId,
                                      ClusterOperationRequest clusterOperationRequest); @Override void addServicesOnCluster(String clusterId, AddServicesRequest addServicesRequest);  }### Answer:
@Test public void testSetClusterConfigSuccess() throws IOException { JsonObject testConfig = new JsonObject(); testConfig.addProperty("name", UPDATED_CONFIG_CLUSTER_NAME); ClusterConfigureRequest clusterConfigureRequest = new ClusterConfigureRequest(null, testConfig, false); clusterClient.setClusterConfig(TEST_CLUSTER_ID, clusterConfigureRequest); }
@Test public void testSetClusterConfigBadRequest() throws IOException { JsonObject testConfig = new JsonObject(); testConfig.addProperty("name", "Unexpected"); ClusterConfigureRequest clusterConfigureRequest = new ClusterConfigureRequest(null, testConfig, false); try { clusterClient.setClusterConfig(TEST_CLUSTER_ID, clusterConfigureRequest); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, e.getStatusCode()); } }