use of com.linkedin.restli.server.twitter.DiscoveredItemsResource in project rest.li by linkedin.
the class TestRestLiMethodInvocation method testBatchUpdateComplexKey.
@Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "batchUpdateComplexKey")
public void testBatchUpdateComplexKey(ProtocolVersion version, String uri, String body) throws Exception {
ResourceModel discoveredItemsResourceModel = buildResourceModel(DiscoveredItemsResource.class);
ResourceMethodDescriptor methodDescriptor = discoveredItemsResourceModel.findMethod(ResourceMethod.BATCH_UPDATE);
DiscoveredItemsResource discoveredItemsResource = getMockResource(DiscoveredItemsResource.class);
ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams> keyA = getDiscoveredItemComplexKey(1L, 2, 3L);
ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams> keyB = getDiscoveredItemComplexKey(4L, 5, 6L);
BatchUpdateRequest<ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams>, DiscoveredItem> batchUpdateRequest = EasyMock.anyObject();
@SuppressWarnings("unchecked") BatchUpdateResult<ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams>, DiscoveredItem> batchUpdateResult = discoveredItemsResource.batchUpdate(batchUpdateRequest);
EasyMock.expect(batchUpdateResult).andReturn(null).once();
checkInvocation(discoveredItemsResource, methodDescriptor, "PUT", version, uri, body, buildBatchPathKeys(keyA, keyB));
}
Aggregations