assertThat(subListRepr.getValue().size(), is(1));
LinkRepresentation firstEntityLink = subListRepr.getValue().arrayGet(0).asLink();
// and given a representation of the 'contains' action accepting a entity href
final JsonRepresentation containsAction = Util.givenAction(client, "ActionsEntities", "contains");
final ObjectActionRepresentation containsActionRepr = containsAction.as(ObjectActionRepresentation.class);
final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
final JsonRepresentation args = invokeLink.getArguments();
assertThat(args.size(), is(3));
// when query the 'contains' action passing in the entity
// (for a range where the entity is contained in the range)
args.mapPut("searchFor.value", firstEntityLink);
args.mapPut("from.value", 0);
args.mapPut("to.value", 3);
RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
// then
thenResponseIsScalarValueOf(restfulResponse, true);
// and when query the 'contains' action for a different range which does not
// contain the entity
args.mapPut("searchFor.value", firstEntityLink);
args.mapPut("from.value", 3);
args.mapPut("to.values", 5);
restfulResponse = client.followT(invokeLink, args);
// then
thenResponseIsScalarValueOf(restfulResponse, false);