NEW YORK — Home diva Martha Stewart testified in court on Tuesday that she did nothing wrong when she signed an agreement to open up shops within most of J.C. Penney’s stores across the U.S.

Stewart testified in New York State Supreme Court as part of a legal battle over whether the company that she founded breached its contract to sell cookware, bedding and other items exclusively at Macy’s when she inked the deal with Penney in 2011.

Stewart, who founded Martha Stewart Living Omnimedia Inc., during three hours of testimony, denied Macy’s allegations that she did anything unethical in brokering the deal with Penney. She said that she was only looking to expand and offer new opportunities for shoppers.

In fact, Stewart said it’s Macy’s that didn’t uphold its end of the agreement to try to maximize the potential of her business. She her brand, which is about a US$300-million business at Macy’s, has grown “static” at the department store chain. She said she was hoping the business would exceed well over US$400-million.

“We were disappointed,” Stewart, wearing a sleeveless jacket and mini skirt, testified. “We did have hopes that the business would be much bigger … We got to a certain dollar amount and struggled and never got any further.”

The trial, which began Feb. 20, focuses on whether Macy’s has the exclusive right to sell some Martha Stewart branded products such as cookware, bedding and bath items.

Penney signed a pact in December 2011 with Martha Stewart Living to open shops at most of its 1,100 stores by this spring. But one month later, Macy’s renewed its long-standing exclusive deal until 2018 and sued Martha Stewart Living and Penney.

Martha Stewart and Penney are using what they believe is a loophole in the agreement between Macy’s and Martha Stewart to move forward with the deal. It’s a provision that allows Martha Stewart to sell goods in categories like bedding in Martha Stewart stores.

According to Martha Stewart lawyers, because the Macy’s agreement doesn’t specify that these Martha Stewart stores have to be “stand alone” stores, the mini shops within Penney stores do not fall under the exclusive agreement. Moreover, Stewart said in court Tuesday that even Amazon.com could be considered a store, given that shoppers are shifting more to online buying.

“I don’t think you need walls to be a store,” she said.

The trial has unveiled some of the drama that has taken place behind-the-scenes between Stewart and the CEOs of Macy’s Inc. and J.C. Penney Co.

During his testimony on Friday, Penney CEO Ron Johnson rejected claims by Macy’s lawyers that he plotted to push Martha Stewart to breach her deal with Macy’s with the goal of eventually becoming the sole carrier of some of Stewart’s products.

Johnson said that he just wanted to get a piece of the action while helping the struggling Martha Stewart business grow. She also said that the expanded partnership could be good for everyone, including Macy’s.

Macy’s attorneys, meanwhile, have portrayed Stewart as someone who turned her back on a good friend, Macy’s CEO Terry Lundgren, to broker a deal with a rival company. During testimony earlier in the trial, Lundgren said that he hung up on Stewart after she told him about the deal she’d reached with Penney, and hasn’t spoken to her since.

Stewart’s testimony comes as the company she founded continues to struggle. Martha Stewart Living just finished its fifth straight year of losses. The company has also had steep sales declines.

Martha Stewart Living has been trying to bolster its merchandising business, which represents 30% of the company’s annual revenue, to offset declines in its broadcast and publishing divisions as people continue to shift toward the Web and mobile apps to get their recipes and food tips.