Upon an examination made under this chapter, the answer of the party or witness examined must be under oath. A corporation must attend by and answer under the oath of an officer thereof, and the judge may, in his or her discretion, specify the officer. Either party may be examined as a witness in his or her own behalf, and may produce and examine other witnesses as upon the trial of an action. The judge or referee may adjourn any proceedings under this chapter, from time to time, as he or she thinks proper.