A General Procedure to Test Containment of Conjunctive Queries