Fix deprecation warning during test.