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: