Fixed tests

I have fixed the tests to match the new API