Fix tests for new API