Someone' s benefiting from having done harm to another person is morally justifiable only if the person who was harmed knew that what was done could cause that harm but consented to its being done anyway
Wesley, a doctor, persuaded Max to take part in a medical experiment in which a new drug was being tested; since Wesley failed to warn Max about the serious side effects of the drug and the drug proved to have no other effects, Wesley was morally unjustified in using the results obtained from Max in his report.