Martha Stewart was questioned in a New York state court on Tuesday over the terms of her contract with Macy's, which the retailer says she broke when she tried to sell cookware and other goods at rival J.C. Penney stores.

Macy's lawyer Theodore Grossman asked the domestic diva what she understood to be the essence of the contract. "The essence was to create product for Macy's under the Martha Stewart collection name," Stewart responded. "That was the essence of the contract."

Grossman then played a clip from a deposition taken last year in which Stewart was asked whether the essence was that her products would not compete at stores that were downmarket from Macy's. "That was my understanding," she said on that occasion.

The trial is over claims by Macy's that Martha Stewart Living's agreement to sell certain products in J.C. Penney stores violated an existing contract between MSLO and Macy's.

The question is central for all three companies operating in an environment of struggling retail. Macy's Chief Executive Terry Lundgren has testified that sales of Martha Stewart products last year grew more than twice as much as the company's as a whole. And J.C. Penney Chief Executive Ron Johnson said Martha Stewart was vital to his company's turn around plan.

New York state Justice Jeffrey Oing has put in place a temporary block that stops J.C. Penney from selling Martha Stewart-branded products in categories that were deemed exclusive in its contract with Macy's, such as cookware and bedding.

J.C. Penney has since announced plans to sell those Martha Stewart products under the "JCP Everyday" brand. Macy's says that, too, violates its contract with Martha Stewart.

Questioning Martha Stewart, Grossman asked whether a person who buys a cast-iron casserole designed by MSLO at one end of the mall would be less likely to buy a casserole from the Martha Stewart collection at Macy's.

"No, I don't think so," replied Stewart, who was dressed in a brown skirt with matching vest and a cream colored shirt.

Grossman also asked Stewart about 2,500 new Martha Stewart designs for J.C. Penney in April 2012, 900 of which were in product categories deemed exclusive in the contract with Macy's.

"We were working under the specifics of our Macy's contract and our Penny's contract and we thought we were allowed to do such a thing," Stewart said.

Lundgren testified last week that Macy's took a "big risk" on Martha Stewart after she was released in 2005 from prison where she had served five months for lying about a stock trade.

Lundgren said Stewart did not tell him about her deal with J.C. Penney until the night before it was announced. He said he hung up on her and has not spoken to her since.

If the case is not over by Friday, Oing has said he could consider expanding the preliminary injunction to include the unbranded products. J.C. Penney has said it wants to stock them before Mother's Day in May.

The trial consolidated Macy's cases against MSLO and Penney's. The cases are Macy's Inc v Martha Stewart Living Omnimedia Inc.n 650297/2012, and Macy's Inc. v J. C. Penney Corp., 652861/2012, New York state Supreme Court, New York County.

(Reporting by Karen Freifeld; Editing by Eddie Evans and Leslie Gevirtz)