Remove all deprecation warnings from tests.