Updated deprecated calls in tests