"{\"data\":{\"userId\":\"myuser\",\"firstName\":\"johnny test\",\"email\":\"test@email.com\",\"status\":\"active\","
+ "\"roles\":[\"roleId\"]}}}";
XStreamRepresentation representation =
new XStreamRepresentation(xstream, jsonString, MediaType.APPLICATION_JSON);
UserResourceRequest request = (UserResourceRequest) representation.getPayload(new UserResourceRequest());
assert request.getData().getUserId().equals("myuser");
assert request.getData().getFirstName().equals("johnny test");
assert request.getData().getEmail().equals("test@email.com");
assert request.getData().getStatus().equals("active");
assert request.getData().getRoles().size() == 1;
assert request.getData().getRoles().get(0).equals("roleId");
}