(Bloomberg) -- A judge rejected a lawsuit by investors who bought almost $1.8 billion worth of debt in what was once the nation’s largest drug-testing company shortly before it filed for bankruptcy.

Trustees for the investors sued JPMorgan Chase and Co. and the other banks that sold them the debt in 2014. The next year, Millennium Health LLC filed a bankruptcy petition, and the value of the debt plummeted.

In their lawsuit, the trustees accused the bank of violating federal security laws by failing to tell them about Millennium’s problems, including a Justice Department investigation of allegedly “flagrantly illegal” billing practices.

U.S. District Judge Paul Gardephe in Manhattan granted the banks’ request to dismiss the suit in 37-page ruling issued Friday.

He described the investors as “highly sophisticated purchasers” who would not reasonably consider the loans to be securities “subject to the attendant regulations and protections.”

“Instead, it would have been reasonable for these sophisticated institutional buyers to believe that they were lending money, with all of the risks that may entail,” the judge wrote.

Among the investors were roughly 400 mutual funds and hedge funds.

The judge granted the trustees’ request to redraft their complaint and refile it.

Read More: Loan Buyers Say JPMorgan Misled Them About Billing Probe

©2020 Bloomberg L.P.