LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
.withHref("http://localhost:39393/objects/NONEXISTENT/123");
// when query the 'contains' action passing in the reference to the non-existent entity
JsonRepresentation args = JsonRepresentation.newMap();
args.mapPut("searchFor.value", nonExistentEntityLink);
args.mapPut("from.value", 0);
args.mapPut("to.value", 3);
Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);