Former judge testifies about relationship