ResourceModel locationResourceModel = statusResourceModel.getSubResource("location");
ResourceModel discoveredItemsResourceModel = resourceModelMap.get("/discovereditems");
ResourceMethodDescriptor methodDescriptor;
StatusCollectionResource statusResource;
RepliesCollectionResource repliesResource;
LocationResource locationResource;
DiscoveredItemsResource discoveredItemsResource;
// #1
methodDescriptor = statusResourceModel.findMethod(ResourceMethod.CREATE);
statusResource = getMockResource(StatusCollectionResource.class);
EasyMock.expect(statusResource.create((Status)EasyMock.anyObject())).andReturn(null).once();
checkInvocation(statusResource,
methodDescriptor,
"POST",
version,
"/statuses",
"{}");
// #1.1: different endpoint
methodDescriptor = repliesResourceModel.findMethod(ResourceMethod.CREATE);
repliesResource = getMockResource(RepliesCollectionResource.class);
EasyMock.expect(repliesResource.create((Status)EasyMock.anyObject())).andReturn(null).once();
checkInvocation(repliesResource,
methodDescriptor,
"POST",
version,
"/statuses/1/replies",