Testing collections of polymorphic objects