Update tests not to use deprecated methods