LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
.withHref("http://localhost:39393/objects/NONEXISTENT/123");
// 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();
// when query the 'contains' action passing in the reference to the non-existent entity
args.mapPut("searchFor.value", nonExistentEntityLink);
args.mapPut("from.value", 0);