assertEquals(resourceMethodDescriptor.getMethod().getName(), "batchGet");
assertEquals(resourceMethodDescriptor.getMethod().getParameterTypes(), new Class<?>[] {Set.class});
assertEquals(resourceMethodDescriptor.getResourceModel().getName(), "follows");
assertNotNull(result.getContext());
PathKeys keys = result.getContext().getPathKeys();
assertNull(keys.getAsString("followerID"));
assertNull(keys.getAsString("followeeID"));
CompoundKey key1 = new CompoundKey();
key1.append("followerID", 1L);
key1.append("followeeID", 2L);
CompoundKey key2 = new CompoundKey();
key2.append("followerID", 3L);
key2.append("followeeID", 4L);
Set<CompoundKey> expectedBatchKeys = new HashSet<CompoundKey>();
expectedBatchKeys.add(key1);
expectedBatchKeys.add(key2);
assertEquals(keys.getBatchIds().size(), 2);
for (CompoundKey batchKey : keys.<CompoundKey>getBatchIds())
{
assertTrue(expectedBatchKeys.contains(batchKey));
expectedBatchKeys.remove(batchKey);
}
assertEquals(expectedBatchKeys.size(), 0);