Fix tests by implementing functions.