fix use of deprecated functionality, enhance unit tests to check for it