NBC: California judge testifies he accidentally shot and killed his wife