replaced %s with %d in test query constructor