President Donald Trump listens during a meeting with airline executives in the State Dining Room of the White House in Washington, DC on Thursday, Feb. 09, 2017.

As Washington comes to grips with the most unusual presidency in modern history, opponents of Donald Trump have warned of a looming "constitutional crisis."

Three weeks in, the judiciary is posing an early test.

Twice, federal courts have blocked the travel restrictions that represent the most significant actions of Trump's new administration. He loudly signaled his displeasure both times, denouncing the "so-called judge" who acted first and then the "political decision" by appeals court judges on Thursday.

The president's barbs against an equal branch of government have unnerved Democrats and Republicans alike. His own Supreme Court pick, Neil Gorsuch, criticized them privately and then authorized public release of his criticism, a move that will likely help avoid trouble during his Senate confirmation.

Still, as House Speaker Paul Ryan observed this week, the Trump administration has honored the rulings that the president dislikes. That adherence has limited the fallout so far, by signaling Trump's understanding of the limits of presidential power under the Constitution.

All along, however, the president has confidently predicted he will win legally in the end. Trump tweeted that "even a bad high school student" could see he was right, and told reporters Thursday night he would prevail "very easily."

But what if he doesn't?

So far, four judges at the trial and appellate level have ruled against him — two appointed by Democratic presidents, two by Republicans. That provides little basis of confidence if the administration decides to appeal to the Supreme Court instead of revising his executive order.

Should Trump lose there, he'd face a choice between abiding by the decision, as his disappointed presidential predecessors have done in similar situations, or defying it. That choice would provide an early indication of whether the new president sits as far outside the norms of his office as his opponents have claimed.