If the contest is of an election to the office of judge of the probate court, sheriff, tax assessor, tax collector, county treasurer, clerk of the circuit court, or any other office filled by the vote of a single county or any subdivision thereof, or any office of a city or town not in this article otherwise provided for, the party contesting must file in the office of the clerk of the circuit court of the county in which the election was held, a statement in writing, verified by affidavit, of the grounds of the contest as provided in this article and must give good and sufficient security for the costs of the contest, to be approved by the clerk. On the filing of the statement and the giving of the security, the clerk must enter the contest on the trial docket as a civil action pending in the court for trial, and, after having made such entry, the clerk must issue a summons, accompanied by a copy of the statement directed to the party whose election is contested, requiring the party, within five days after the service of the summons, to appear and make answer to the statement, which summons must be served by the sheriff or by a constable, if the contest is with respect to the office of sheriff. The contest is triable by the court without the intervention of a jury and must be heard and tried in precedence of all other cases, civil or criminal, standing for trial in the court. Either party is entitled to the writ of subpoena to compel the personal attendance of witnesses on the trial of the contest, and against defaulting witnesses such proceedings may be had as against other defaulting witnesses in civil cases pending in the court. Testimony may also be taken by depositions in the case, and in like manner as depositions are taken in other civil cases.