Few of us will ever face a public grilling the likes of which Facebook CEO Mark Zuckerberg is dealing with on Capitol Hill, but how he prepared for the big event offers a lesson for anyone who wants to perform their best when the stakes are high.

After day one of hearings into the company’s handling of user data, Zuckerberg may not have won over skeptical lawmakers or angry users. But, according to an article in The Wall Street Journal, the 33-year-old billionaire entrepreneur “appeared well prepared” over several hours of intense questions from lawmakers.

The New York Times said his intense preparation “appeared to pay off, as the executive seemed calm, deferential, and prepared.” Investors noticed. Facebook stock rose 4.5 percent after the first day of hearings.

Zuckerberg was clearly prepared because a reporter for the Associated Press took a photo of a binder of notes that the Facebook co-founder kept on the table. The notes contained two or three bullet points to pointed questions and topics. Zuckerberg had prepared and prepared diligently.

How do leaders prepare for hours and hours of intense, difficult questions? This article on CNN has the answer. The network’s tech reporter writes:

“Behind the scenes, Zuckerberg and his team did mock hearings over the past week in a conference room at Facebook set up to look like a congressional hearing room.”

That’s exactly how leaders get ready.

For nearly twenty years, I’ve had a front row seat to high stakes presentations. While I haven’t worked for Facebook, I have worked with CEOs of publicly-traded companies to prepare them for presentations, keynotes or televised interviews when the stakes are high and the pressure is on.

It’s not all negative press, of course. But any time a CEO goes on an IPO road-show or delivers the opening keynote at CES or faces tough questions on CNBC about the company’s stock price, it can be a big deal.

Avoid “choking” when the stakes are high.

We prepare as Facebook did. We rehearse under similar conditions the leader will face. It’s one of the best ways to avoid the dreaded “choke.”

According to psychologists, a big part of the reason why athletes or CEOs stumble under pressure is because they haven’t prepared for stressful situations. When stress hormones kick in–triggering our flight or fight response–people get nervous, tight, and fail to perform their best.

The solution is to practice–a lot. Specifically, to train under stressful conditions. Even mildly stressful conditions work exceptionally well for mission-critical presentations.

For example, two years ago I was invited to speak to one of the largest gatherings of financial advisors in the U.S. The organizers of the event asked if I’d like to fly from California to Chicago to “practice.”

I thought it was a little unusual since I could rehearse my presentation on my own in the privacy of my office. But they made a good counter-argument. Since I’d be speaking on a massive stage in front of 10,000 people, I’d be more confident if I knew what to expect.

I made the trip for rehearsals. They were right. When the big day arrived, I felt confident because I had been there before–at least in rehearsal.

Here’s the key: Rehearse under pressure. If you’re going to face tough questions, have colleagues or friends grill you with the type of questions you’ll be asked. If you’re giving an important presentation, mimic the conditions of the presentation as best you can.

I know a former CEO of a publicly-traded company in Silicon Valley who built a reputation as an excellent public-speaker. He was obsessive about practicing under similar conditions that he would face in his presentation.

He arrived early to practice his keynotes in the actual hall where the presentation would take place. He wanted the lights and the air conditioner to be positioned at exactly where they would be set for the actual event. Rehearsing under similar conditions gave this CEO the confidence to perform his best when the pressure was on.

Simulating stressful conditions will prevent you from cracking when the pressure is on.