Fix a deprecated method call in the tests