It happened in fiction, in the movie (YouTube) Seven Days in May.
In case something happens to the link, Wikipedia synopsis here. Buy it or rent it.
L. Fletcher Prouty, Chief of Special Operations for the Joint Chiefs of Staff under President John F. Kennedy thought an event closely paralleling Seven Days conjoined the Kennedy assassination. His book, JFK: The CIA, Vietnam, and the Plot to Assassinate John F. Kennedy, cannot simply be dismissed (or believed). His later descent into the sinkhole of conspiracy theory robs it of an author’s stature. Yet it lingers, at least as counterfactual history, with tantalizing possibilities to touch reality.
To those of you who swore your allegiance, not to a person or party, but to the Constitution of the United States, the words of Thomas Paine beckon:
December 23, 1776
THESE are the times that try men’s souls. The summer soldier and the sunshine patriot will, in this crisis, shrink from the service of their country; but he that stands by it now, deserves the love and thanks of man and woman. Tyranny, like hell, is not easily conquered; yet we have this consolation with us, that the harder the conflict, the more glorious the triumph. What we obtain too cheap, we esteem too lightly: it is dearness only that gives every thing its value…