61-5-211. Right of appeal to court. A person denied a driver's license or whose license has been canceled, suspended, or revoked by the department except when the cancellation or revocation is mandatory under the provisions of this chapter may file a petition within 30 days after the denial, cancellation, suspension, or revocation for a hearing in the matter in the district court in the county in which the person resides. The court has jurisdiction and it shall set the matter for hearing upon 30 days' written notice to the department, and shall take testimony and examine the facts of the case and determine whether the petitioner is entitled to a driver's license or is subject to suspension, cancellation, or revocation of the license under the provisions of this chapter.