Updating tests to API