ResourceMethod method = ResourceMethod.GET;
RecordTemplate input = new RecordTemplateWithPrimitiveKey().setBody("foo").setId(1L);
Map<String, String> headers = new HashMap<String, String>();
headers.put("foo", "bar");
RestResponseDecoder decoder = new EntityResponseDecoder(GetRequest.class);
ResourceSpec resourceSpec = buildResourceSpec();
Map<String, Object> queryParams = new HashMap<String, Object>();
queryParams.put("foo", "bar");
String methodName = "baz";
String baseUriTemplate = BASE_URI_TEMPLATE;
Map<String, Object> pathKeys = new HashMap<String, Object>();
pathKeys.put("foo", "bar");
RestliRequestOptions requestOptions = RestliRequestOptions.DEFAULT_OPTIONS;
Request request1 = new Request(method,
input,
headers,
decoder,
resourceSpec,
queryParams,
methodName,
baseUriTemplate,
pathKeys,
requestOptions);
Request request2 = new Request(ResourceMethod.ACTION,
input,
headers,
decoder,
resourceSpec,
queryParams,
methodName,
baseUriTemplate,
pathKeys,
requestOptions);
data.add(Arrays.asList(request1, request2, false));
Request request3 = new Request(method,
new RecordTemplateWithPrimitiveKey().setBody("bar"),
headers,
decoder,
resourceSpec,
queryParams,
methodName,
baseUriTemplate,
pathKeys,
requestOptions);
data.add(Arrays.asList(request1, request3, false));
Request request4 = new Request(method,
input,
Collections.singletonMap("FOO", "BAR"),
decoder,
resourceSpec,
queryParams,
methodName,
baseUriTemplate,
pathKeys,
requestOptions);
data.add(Arrays.asList(request1, request4, false));
ResourceSpec resourceSpec1 = new ResourceSpecImpl(EnumSet.of(ResourceMethod.GET,
ResourceMethod.PARTIAL_UPDATE,
ResourceMethod.UPDATE),
null,
null,
Long.class,