Add tests for AND priority over OR