The hard-fought battle between Macy’s Inc. and J.C. Penney over Martha Stewart merchandise is finally drawing to a close.

On Thursday and Friday, New York State Supreme Court Justice Jeffrey Oing will hear closing arguments in the case, and then rule on whether J.C. Penney can sell Martha Stewart-branded merchandise in its stores.

In 2011, J.C. Penney bought 17 percent of Martha Stewart Living Omnimedia (MSLO) and announced plans to open Martha Stewart Living shops in its stores. Macy’s, however, had something to say about Penney’s proposal, arguing that it had an exclusive agreement to sell Stewart’s products.

Penney’s counterargument was that it would be selling Stewart-branded merchandise within its existing locations—not in standalone stores. The ensuing legal battle culminated in a five-week trial that included testimony from Macy’s and J.C. Penney executives and Martha Stewart herself.

Both J.C. Penney and Martha Stewart Living have struggled financially in past years, with the latter’s stock losing 44 percent of its value last year, Bloomberg reports. But Oing has stated that he will not take the companies’ financial state into account when deciding the case.

For more InsideCounsel coverage of the case, see:

Macy’s appeals ruling that J.C. Penney can sell unbranded Martha Stewart products

Disclosing contract didn’t violate licensing agreement

J.C. Penney won’t sell Martha Stewart stuff … for now

Martha Stewart takes the stand in Macy’s-J.C. Penney trial saga

Macy’s CEO: “sick to my stomach” over J.C. Penney deal

Macy’s claims J.C. Penney and Martha Stewart teamed up to steal customers

Macy’s sues J.C. Penney over Martha Stewart Living contract

Judge temporarily blocks Martha Stewart Living from selling at J.C. Penney

Martha Stewart Living brings Macy’s battle to a boil

Macy’s seeks injunction in spat with Martha Stewart

Macy’s sues Martha Stewart Living