W.S. Gilbert (himself a lawyer by training) and Arthur Sullivan wrote Trial by Jury, the whole plot of which was an action for breach of promise of marriage.
And at least one real judge, Sir Harold Cassel Q.C. was successfully sued for it, though he wasn't a judge at the time. No doubt the fact that he was the scion of a banking family, which had financed much of Britain's national efforts in Edwardian times, did not, how shall I put it, dissuade the plaintiff from starting the action :)