public void updateStatus(RepositoryStatusResource repoStatus)
throws IOException
{
String uriPart = SERVICE_PART + "/" + repoStatus.getId() + "/status";
XStreamRepresentation representation = new XStreamRepresentation(xstream, "", MediaType.APPLICATION_XML);
RepositoryStatusResourceResponse resourceResponse = new RepositoryStatusResourceResponse();
resourceResponse.setData(repoStatus);
representation.setPayload(resourceResponse);
Response response = null;
final String responseText;
try {
response = nexusRestClient.sendMessage(uriPart, Method.PUT, representation);
responseText = response.getEntity().getText();
assertThat("Fail to update '" + repoStatus.getId() + "' repository status " + response.getStatus()
+ "\nResponse:\n"
+ responseText + "\nrepresentation:\n" + representation.getText(), response,
isSuccessful());
}
finally {
nexusRestClient.releaseResponse(response);
}