Add deprecated warning for deprecated method.

Fix failing tests.