BS-8302, refactor deprecated method inunit test