Fix warnings (all deprecations) in tests