// given
RestfulResponse<ObjectCollectionRepresentation> childrenRestfulResponse =
RestfulResponse.ofT(objectResource.accessCollection("PRNT", "53", "children"));
ObjectCollectionRepresentation childrenRepr = childrenRestfulResponse.getEntity();
JsonRepresentation collValue = childrenRepr.getValue();
final int numChildren = collValue.size();
assertThat(numChildren, is(IsisMatchers.greaterThan(0)));
final LinkRepresentation firstChildRepr = collValue.arrayIterator(LinkRepresentation.class).next();
// when
final RestfulResponse<ObjectActionRepresentation> removeChildRestfulResponse =
RestfulResponse.ofT(objectResource.actionPrompt("PRNT", "53", "removeChild"));
final ObjectActionRepresentation removeChildRepr = removeChildRestfulResponse.getEntity();
LinkRepresentation invokeLinkRepr = removeChildRepr.getLinkWithRel(Rel.INVOKE);
JsonRepresentation args = invokeLinkRepr.getArguments();
args.mapPut("childEntity.value", firstChildRepr);
RestfulResponse<JsonRepresentation> invokeResp = client.follow(invokeLinkRepr, args);
@SuppressWarnings("unused")
JsonRepresentation invokeRepr = invokeResp.getEntity();
final HttpStatusCode status = invokeResp.getStatus();
assertThat(status, is(HttpStatusCode.OK));
// then