assertEquals("The Collection is not the right size.", keys.size(), objects.size());
for (final Object object : objects) {
ejbObject = (ComplexCmpObject) PortableRemoteObject.narrow(object, ComplexCmpObject.class);
// This could be problematic, it assumes the order of the collection.
final ComplexCmpBeanPk foundKey = (ComplexCmpBeanPk) ejbObject.getPrimaryKey();
assertTrue("Extra ejb found " + ejbObject.getPrimaryKey(), keys.contains(foundKey));
foundKeys.add(foundKey);
}
keys.removeAll(foundKeys);