executeQuery and tests