Complete and fix the tests