Test ballot functions