/**
* For clientFollow tests; returns a link to the Nth entity in the list returned by invoking the specified repo and action
*/
public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName, String actionName, int idx) throws Exception {
final DomainServiceResource serviceResource = client.getDomainServiceResource();
Response response = serviceResource.invokeActionQueryOnly(repoName, actionName, null);
RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();