Added apply rule tests