Fix the tests by implementing the functions.