Elizabeth Holmes’ marathon testimony is expected to conclude on Wednesday morning, capping six days on the witness stand considered the main event of one of the highest-profile Silicon Valley trials in decades. Each side sought to portray vastly different portraits of Holmes to the jury. Prosecutors tried to show that the onetime billionaire lied to investors and attempted to conceal that Theranos devices could not deliver what she had promised. Her own lawyers, however, tried to paint Holmes as a true believer in the company’s technology. Holmes said that she made some mistakes but never intended to deceive anyone. Part of her defense has included acknowledging that while Holmes was in charge she also relied upon the expertise of others, including taking the advice of counsel to protect the company’s trade secrets. “We had a huge amount of invention that was happening in our laboratories. We had teams of scientists and engineers that were working really hard on coming up with new ideas for patents and trade secrets, and we needed to figure out how to protect them,” she testified on Tuesday. The prosecution needs to convince jurors precisely the opposite: that Holmes intended to mislead investors, doctors, and patients about the company’s technology for financial gain. During her time on the stand, Holmes has cited “trade secrets” as rationale for why the company concealed its use of commercially sold lab equipment to test patient samples; why the company went after whistleblowers it discovered were talking to then-Wall Street Journal reporter John Carreyrou; and why it was aggressive in trying to quash his investigation that published in October 2015 and upended the company. Mention of trade secrets popped up as assistant US attorney Robert Leach questioned Holmes about journalist Roger Parloff’s Fortune Magazine story – the first major cover story on her. Had she, as the article stated, declined to have Theranos devices even photographed to protect trade secrets? “I think so,” she testified. Leach’s frustration with the trade secret defense became evident last Tuesday. When Leach asked whether Holmes reached out to media mogul and Theranos investor Rupert Murdoch in an attempt to have the executive chairman of News Corp (which owns The Wall Street Journal) intervene on Carreyrou’s story, she cited the term once more. “It was part of my effort to get Mr. Murdoch to make sure that our trade secrets were not published,” Holmes testified last week. Holmes also cited trade secrets as the reason why Theranos was not open about its use of third-party blood-testing machines, including with Walgreens, its key retail partner. She testified this qualified as a trade secret because Theranos had “made inventions” on the equipment, altering them to process small amounts of blood. In contrast, Leach drew out that Theranos had a confidentiality agreement with Walgreens and was comfortable sending the retailer two of its devices to review. “You trusted them not to reverse engineer the minilab?” “Correct,” Holmes testified. Holmes, once hailed as the next Steve Jobs, is fighting nine counts of wire fraud and two counts of conspiracy to commit wire fraud over allegations she misled investors, doctors, and patients about her company to take their money. She faces 20 years in prison and a fine of $250,000, plus restitution, for each count of wire fraud and each conspiracy count. She has pleaded not guilty. Holmes is the third witness the defense has called and she is expected to be one of the final witnesses before it rests its case. The government, over the course of 11 weeks, called 29 witnesses, including scientists, doctors, retail executives, former employees and even a former Defense Secretary, to make its case. The defense first called a paralegal for the law firm representing Holmes who introduced a number of documents into evidence, followed by a former Theranos board member who joined after the startup’s downward spiral had begun. In what was the most emotionally charged moment of her time on the stand so far, Holmes testified that she was raped as a student at Stanford (which she said contributed to her decision to drop out and focus on building a company) and then claimed she entered into a decade-long psychologically, emotionally and sexually abusive relationship with Ramesh “Sunny” Balwani, Theranos’ COO. Balwani, in court filings, has denied the allegations. In pre-trial court filings, the defense indicated it may call clinical psychologist Dr. Mindy Mechanic to testify as an expert in its case. Mechanic, whose work focuses on the psychosocial consequences of violence, trauma and victimization, evaluated Holmes for 14 hours, and also conducted interviews with her family members, according to court filings.(The government was also able to have an expert evaluate Holmes, which it may introduce in response to Dr. Mechanic’s testimony, should she testify.) Holmes’ trial, which has faced a number of delays and setbacks, appears to be nearing its end. After jurors were excused last Tuesday, Holmes’ defense attorney Kevin Downey indicated that the defense’s case would “not last the balance” of this week after Holmes’ testimony concludes. Holmes will resume the stand Wednesday in the San Jose federal courtroom where her trial is underway.