cardiff: Fixing unit tests