CLN: refactor testing