Add tests for polymorphism