Update tests to fit the new API