Add tests for AND queries