Fixed tests for api changes.