Fixed test deprecation warnings