fix tests for deprecated api