T-Mobile and Sprint have likely done enough to convince a federal judge to allow their proposed $28 billion merger to go forward, according to several leading Wall Street analysts.

Their predictions come after 10 days of testimony in a trial brought by attorneys general from more than a dozen states who sued to block the third and fourth-largest wireless carriers from combining. Closing arguments in the federal case in New York are scheduled to begin in two weeks.

Based on testimony from witnesses including former Sprint CEO Marcelo Claure, T-Mobile CEO John Legere, and Dish CEO Charlie Ergen, analyst Walt Piecyk at Lightshed Partners concluded that the carriers had swayed the judge to approve the deal. The Justice Department and Federal Communications Commission have already signed off on the merger.

“Our optimism continues to grow about T-Mobile’s ability to prevail,” Piecyk wrote in a report after he attended the trial and watched all of the testimony. “If T-Mobile prevails and the States are unable to obtain a stay while they appeal, we expect the companies to close the transaction.”

One key factor for Piecyk was the testimony of Dish CEO Ergen. Under a settlement with federal regulators, Sprint and T-Mobile would sell Dish some airwave licenses along with the Boost prepaid wireless brand, which has about 9 million customers. The goal is to maintain competition in the mobile market by creating a new fourth player to replace Sprint.

“Many investors believe that the case hinges on Charlie Ergen’s ability to establish himself and Dish as a viable and credible fourth wireless competitor,” Piecyk wrote. “We believe he did that…under cross examination.”

Ric Prentiss at Raymond James also expects the judge to side with the carriers, though the analyst said he “lowered our odds of deal approval probability from 85% to 55%.” Nothing that happened during the trial made the case an obvious easy win for either side, and T-Mobile and Sprint didn’t offer any additional concessions, Prentiss noted.

After last year’s settlements with the DOJ and FCC, Prentiss had hoped for “a third settlement strengthening and quickening the ability of Dish to become a fourth…5G competitor (which owns its own network infrastructure).”

Not everyone on Wall Street expects the deal to go through. Paul Gallant, an analyst at Cowen, put the odds of Judge Victor Marrero approving the merger at only 40%.

“After attending the trial, we suspect Judge Marrero will side with state AGs and block the T-Mobile/Sprint merger,” he wrote. The state AGs “probably met their initial burden of proof–companies rarely win once that happens. And (the) states likely raised enough questions about (the) Dish fix and merger synergies to prevent Marrero from accepting them.”

The pessimistic evaluation is also evident in Sprint’s stock. Under the terms of the merger, Sprint shareholders would receive 0.10256 shares of T-Mobile for every share of Sprint. With T-Mobile currently trading at about $78, that implies a merger price of $8 for Sprint. But Sprint is trading at $5.18, a 35% discount to the implied merger price if the deal is approved.

A ruling in the case is expected as soon as February.