Added sensible tests for AbstractCollection#resource_class

And fix nonsense error message