Fix tests to reflect changes in api