Fix tests to use the new API.