add condtional query tests

Why this line?