tests: avoid use of deprecated APIs