"{\"data\":{\"name\":\"Test Priv\",\"type\":\"target\",\"method\":[\"read\",\"create\"],"
+ "\"repositoryTargetId\":\"targetId\",\"repositoryId\":\"repoId\",\"repositoryGroupId\":\"groupId\"}}";
XStreamRepresentation representation =
new XStreamRepresentation(xstream, jsonString, MediaType.APPLICATION_JSON);
PrivilegeResourceRequest request =
(PrivilegeResourceRequest) representation.getPayload(new PrivilegeResourceRequest());
assert request.getData().getName().equals("Test Priv");
assert request.getData().getType().equals(TargetPrivilegeDescriptor.TYPE);
assert request.getData().getMethod().size() == 2;
assert request.getData().getMethod().contains("read");
assert request.getData().getMethod().contains("create");
assert request.getData().getRepositoryTargetId().equals("targetId");
assert request.getData().getRepositoryId().equals("repoId");
assert request.getData().getRepositoryGroupId().equals("groupId");
}