public static JsonRepresentation givenAction(RestfulClient client, final String serviceId, final String actionId) throws JsonParseException, JsonMappingException, IOException {
final String href = givenHrefToService(client, serviceId);
final String detailRel = Rel.DETAILS.andParam("action", actionId);
final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", actionId, detailRel);
final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
final DomainObjectRepresentation repr = restfulResponse.getEntity();
final JsonRepresentation actionLinkRepr = repr.getAction(actionId);