The 26-year-old man began deliberately gaining weight before a physical examination, a judge ruled.