Stephen Wrage is a professor in the political science department at the U.S. Naval Academy in Annapolis. This piece reflects the author’s views and not those of the Navy or any other organization.

The day it was announced that President Trump would speak at the U.S. Naval Academy graduation, I received startling emails from several midshipmen, written to my private email account from their private accounts. One message said: “We are under no obligation to clap for Donald Trump. Trump wants the image of young service members cheering him on and we can deny him that image.” Another proposed an online petition on social media, pledging not to applaud Trump at commissioning. There were four more with similar themes: “We are taught selflessness; he practices narcissism.” “If he is a role model, it is only in the exact opposite.”

This sort of defiance was new to me, even after 25 years of teaching at the academy. Their complaints centered on the president’s character. After a series of exchanges, the mids agreed that no action should mar their commissioning on Friday, except insofar as Trump himself will mar it.

The mids found a better model in Defense Secretary Jim Mattis — a better model of a leader and a better way to conduct themselves. At Trump’s first full Cabinet meeting, when he went around the table demanding expressions of adulation, Mattis didn’t comply. The retired Marine Corps general performed what one mid admiringly called “the Mattis sidestep.” Mattis countered with respect for the people he leads: “Mr. President, it’s an honor to represent the men and women of the Department of Defense. We are grateful for the sacrifices our people are making in order to strengthen our military, so our diplomats always negotiate from a position of strength.” The mids will sidestep Trump. They will withhold the praise he wants but they will show no sign of disrespect.

Trump is needy, and military events such as the parade in Paris excite him. There are some mids who will be thrilled by him, and some parents from red states will be tempted to treat the ceremony like a rally, but most will sense how much the day means to their daughters and sons and will restrain themselves. Some faculty will want to turn their backs or walk out when Trump speaks, but most who would protest will just stay home.

There is no question, however, how the officers whom the midshipmen report to will behave: They will offer the quiet deference they owe to the office of the president. They speak with full academic freedom in their classrooms, but they maintain military decorum at a ceremony.

Decades later, officers remember their commissioning. One Marine I know recalled whole passages he heard from the speech at his graduation in 1993, 25 years ago. That year, John McCain came to speak and, as they say, he killed it.

McCain told them, “As ensigns and second lieutenants, the character of the young sailors and Marines entrusted to your care will be formed in large part by their appreciation of your character. You are where leadership begins. You are the models who stand just past the sergeants and chiefs, and those under your command will derive from your behavior the direction of their own lives. Their firm respect for you, on which their lives and our security will depend, will be determined by how faithfully you keep, on duty and off, the code you learned here.” McCain was telling them something they had learned every day for four years. Former Joint Chiefs of Staff chair Martin E. Dempsey tweeted a similar message just last week: “Character matters. Always. In everything. Period.”

When McCain said it, it was unforgettable. If Trump says the same things, the mids will cringe. They know about Trump’s bone spurs. They know what McCain suffered in Hanoi, and they know Trump told Howard Stern that risking sexually transmitted diseases “like a great and very brave soldier” was his “personal Vietnam.”

McCain even addressed the matter on the minds of many mids right now: how to respond to a president morally unfit to command. Bill Clinton, who had taken office just four months before, was scorned by many academy graduates for taking ROTC support but evading service. McCain said, “When the American people elect a leader to govern the affairs of our great nation, our respect for their authority must remain inviolate. For it is that respect from which our profession derives so much of its nobility in a democracy. Your commanders and instructors have worked hard to impart these lessons to you.”

In Annapolis, Trump won’t find sycophants such as the ones he packed into his Cabinet. He will find officers. That’s what the Naval Academy produces. They will show the measured respect his office requires, but he shouldn’t imagine that he is leading them. Trump is no McCain. The word “character” should be off-limits for Trump.

When Trump goes off script the way he did last year at the Coast Guard Academy commencement and starts to talk about crowd sizes or witch hunts, many officers will say to themselves, “On this, the midshipmen’s day, they deserved better.”

At least one Marine in the crowd will recall the way McCain closed his speech: “I will go to my grave in gratitude to my Creator for allowing me to stand witness to such courage and honor. And so will you. My time is slipping by. Yours is fast approaching. You will know where your duty lies. You will know. God bless you. Semper Fi. Fair winds and following seas.”