}
public MirrorResourceListResponse setMirrors(String repositoryId, MirrorResourceListRequest resourceRequest)
throws IOException
{
XStreamRepresentation representation = new XStreamRepresentation(xstream, "", mediaType);
String serviceURI = "service/local/repository_mirrors/" + repositoryId;
// now set the payload
representation.setPayload(resourceRequest);
String responseText = RequestFacade.doPostForText(serviceURI, representation, isSuccessful());
LOG.debug(" getResourceFromResponse: " + responseText);
representation = new XStreamRepresentation(xstream, responseText, mediaType);
// this
MirrorResourceListResponse resourceResponse =
(MirrorResourceListResponse) representation.getPayload(new MirrorResourceListResponse());
Assert.assertNotNull("Resource Response shouldn't be null", resourceResponse);
for (MirrorResource resource : resourceResponse.getData()) {
Assert.assertNotNull(resource.getId(), "Id shouldn't be null");