NEW YORK — Home décor and food guru Martha Stewart testified in court on Tuesday that she did nothing wrong when she signed an agreement to open shops within most of J.C. Penney’s stores across the country.

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

According to Martha Stewart lawyers, because the Macy’s agreement doesn’t specify that Martha Stewart stores have to be “stand alone” locations, the mini shops within Penney’s stores would not violate the contract.

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. He said he hasn’t spoken to her since.

Unlimited Digital Access. $1 for 4 weeks.

“I was quite taken back by his response and when he hung up on me I was quite flabbergasted,” Stewart, 71, wearing a light-brown tunic and miniskirt, testified Tuesday.