Fixed tests to reflect changes in API.