tests and code for voting on a ballot