Map<String, ResourceModel> resourceModelMap =
buildResourceModels(StatusCollectionResource.class, LocationResource.class, DiscoveredItemsResource.class);
ResourceModel statusResourceModel = resourceModelMap.get("/statuses");
ResourceMethodDescriptor resourceMethodDescriptor = statusResourceModel.findMethod(ResourceMethod.GET);
final StatusCollectionResource resource = getMockResource(StatusCollectionResource.class);
RestRequestBuilder builder =
new RestRequestBuilder(new URI("/statuses/1")).setMethod("GET")
.addHeaderValue("Accept", "application/json")
.setHeader(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION,
AllProtocolVersions.LATEST_PROTOCOL_VERSION.toString());
RestRequest request = builder.build();
RoutingResult routingResult =
new RoutingResult(new ResourceContextImpl(buildPathKeys("statusID", 1L), request, new RequestContext()),
resourceMethodDescriptor);
expect(mockRegistry.getArgumentBuilder(resourceMethodDescriptor.getType())).andReturn(mockBuilder);
expect(mockBuilder.extractRequestData(routingResult, request)).andReturn(requestData);