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.