Fixed all the tests to run with new API