Implement World#entitiesOfType method and associated tests.