Fixed unit testing code, it now executes but it returns errors.