Removed deprecation warnings in tests.