Removing Q dependency in CAS test helper