}
@Test
public void testPromiseGetAssociativeResource() throws Exception
{
ResourceModel followsResourceModel = buildResourceModel(
PromiseFollowsAssociativeResource.class);
ResourceMethodDescriptor methodDescriptor;
PromiseFollowsAssociativeResource resource;
// #1: get
methodDescriptor = followsResourceModel.findMethod(ResourceMethod.GET);
resource = getMockResource(PromiseFollowsAssociativeResource.class);
CompoundKey rawKey = new CompoundKey();
rawKey.append("followerID", 1L);
rawKey.append("followeeID", 2L);
CompoundKey key = eq(rawKey);
EasyMock.expect(resource.get(key)).andReturn(Promises.value(new Followed(new DataMap()))).once();
checkInvocation(resource,
methodDescriptor,
"GET",
version,
"/promisefollows/(followerID:1,followeeID:2)",
buildPathKeys("followerID", 1L, "followeeID", 2L, followsResourceModel.getKeyName(), rawKey));
}