Tests: fixed usage of deprecated method