I came across this quotation of Mill while reading Alexander Campbell Fraser's Biographia Philosophica: A Retrospect (chapter VI), but I'm unable to find the source in Mill. Does anyone know it?
Biographia Philosophica: A Retrospect By Alexander Campbell Fraser
UPDATE: Miriam Burstein identifies the source in Dissertations and Discussions. It is, somewhat (although not wholly) unexpectedly, an early (very early -- 1835) defense of utilitarianism against one of its major critics, Adam Sedgwick, in his Discourse on the Studies of the University. The criticism apparently had no effect, since in the 1850 edition Sedgwick inserted a note saying that he did not change one sentence of his attack on the utilitarian theory of morals because his views on that subject had not changed.