final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
assertThat(actionPromptRepr.getString("memberType"), is("action"));
// self link
final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
assertThat(selfLink, isLink(client)
.httpMethod(RestfulHttpMethod.GET)
.href(endsWith("/objects/RTNE/78/actions/contains"))
.returning(HttpStatusCode.OK));
// up link
final LinkRepresentation upLink = actionPromptRepr.getLinkWithRel(Rel.UP);
assertThat(upLink, isLink(client)
.httpMethod(RestfulHttpMethod.GET)
.href(endsWith("/objects/RTNE/78"))
.returning(HttpStatusCode.OK)
.type(RepresentationType.DOMAIN_OBJECT.getMediaType())
.title("Untitled Actions Entity"));
//invoke link
final LinkRepresentation invokeLink = actionPromptRepr.getLinkWithRel(Rel.INVOKE);
assertThat(invokeLink, isLink(client)
.httpMethod(RestfulHttpMethod.GET)
.href(endsWith("/objects/RTNE/78/actions/contains/invoke")));
assertThat(invokeLink.getArguments(), is(not(nullValue())));
assertThat(invokeLink.getArguments().isArray(), is(false));
assertThat(invokeLink.getArguments().size(), is(2));
// described by link
final LinkRepresentation describedByLink = actionPromptRepr.getLinkWithRel(Rel.DESCRIBEDBY);
assertThat(describedByLink, isLink(client)
.returning(HttpStatusCode.OK)
.responseEntityWithSelfHref(describedByLink.getHref()));
assertThat(actionPromptRepr.getExtensions().getString("actionType"), is("user"));
assertThat(actionPromptRepr.getExtensions().getString("actionSemantics"), is("safe"));
assertThat(actionPromptRepr.getMap("parameters").size(), is(2));
}