Fix test for deprecation warning