(a) Upon a motion with good cause shown or upon stipulation of the parties, an agency may order discovery, including a deposition to perpetuate testimony, by any reasonable method including those methods prescribed by law in civil actions.
(b) If the witness resides outside the state and if the agency orders the taking of the testimony of the witness by deposition, the agency shall obtain an order of court to that effect by filing a petition for the taking of the deposition in the superior court nearest to the principal office of the agency. The proceedings on this order shall be in accordance with provisions governing the taking of depositions in the superior court in a civil action.