The decision by Judge Jack B. Weinstein of Federal District Court came as part of a ruling that gave class-action status to a case brought by insurance companies , pension funds and unions that want Lilly to repay them billions of dollars they spent on the drug .