Data query tests