Convert tests from deprecated function