In a case of life imitating art — or at least an episode of TV — Julianna Margulies, who plays legal eagle Alicia Florrick on CBS’s “The Good Wife,” could take the stand soon in her own trial.

The actress is being sued by former manager Steve Dontanville, who claims she owes his firm unpaid commissions in what’s become an increasingly nasty Hollywood legal battle.

A judge has set a trial for Jan. 8 in LA after Margulies lost an appeal for summary judgment to avoid a trial.

Last year, Dontanville’s D/F Management alleged it was owed $420,000 in commissions by its former client Margulies for a L’Oréal campaign and the “Good Wife” gig. But the series has since sold into syndication, and the suit was revised to target what could be millions more.

Margulies, meanwhile, has countersued, claiming, “Dontanville demonstrated a general lack of initiative, attention, focus and commitment” as her rep. D/F’s lawyer Mathew Rosengart has threatened to file a “civil malicious prosecution claim” against Margulies in response.

Said Rosengart: “We are pleased, but not surprised, by the judge’s rejection of both defendant’s motion for summary judgment and her efforts to delay the trial until April. My clients also regret that after reneging on her contract with them, Ms. Margulies chose to file an ill-advised, malicious, and meritless claim against them in an effort to avoid a trial. My clients look forward to the trial in January. ”

Margulies’ attorney, Sheldon Eisenberg, told us: “We are really disappointed that D/F has chosen to make empty and baseless threats in the press, which not coincidentally are coming days before we are participating in a court-required mediation process. It reflects the desperation of their completely unsustainable position in this case: trying to enforce a purported promise that D/F expressly admits that Ms. Margulies never made and that was never even discussed. The case has no merit, is completely unfair to Ms. Margulies, and we expect a favorable outcome if we have to proceed to trial in January.”