Lawyers for two former high-level Trump administration officials were in court Thursday in legal battles that center on whether they will testify in the House impeachment inquiry and test the limits of the administration’s claims that presidential advisers are “absolutely immune” from congressional subpoena.

Both cases come down to whether the two former aides — White House counsel Donald McGahn and deputy national security adviser Charles Kupperman — can be forced to testify on Capitol Hill.

The cases — heard simultaneously in neighboring courtrooms in the District Court in Washington — set up a separation-of-powers test between the White House and Congress that could affect other impeachment-related testimony.

At McGahn’s hearing, U.S. District Judge Ketanji Brown Jackson expressed incredulity at the Trump administration’s claim that the former White House counsel and top presidential aides cannot be compelled to testify by Congress, calling it a “peculiar” argument that threatens to upset the Constitution’s system of checks and balances.

Kupperman, who served as deputy to former national security adviser John Bolton, filed a lawsuit last week to try to resolve conflicting orders from Congress and the White House over his participation in the investigation into Trump’s efforts to pressure Ukraine to investigate the president’s political rivals.

Kupperman did not appear for a House deposition Monday to await a ruling by U.S. District Judge Richard J. Leon, who set a hearing in the matter for Dec. 10. Kupperman’s attorney Charles Cooper, who also represents Bolton, did not rule out the possibility that Bolton could be added to the lawsuit if he is subpoenaed.

Throughout the hearing, the judge emphasized the importance of moving quickly to resolve an important matter of public interest. He chastised a Justice Department lawyer who asked for more time to file a brief because of a holiday conflict.

“When it’s a matter of this consequence to this country, you roll your sleeves up and get the job done,” said Leon, a nominee of President George W. Bush.

In the other courtroom during three hours of questioning in the case, Jackson suggested the Justice Department’s stance conflicts with precedent, and would diminish the courts’ role in interpreting the law.

“It’s just so peculiar, I’m trying to wrap my mind around it,” Jackson told Deputy Assistant Attorney General James Burnham, who argued that the House “as a general proposition” can never sue the executive branch, nor compel top White House aides to appear.

“You’re suggesting . . . out of respect for separation of powers, the judiciary is not going to answer what the law is when the executive and legislature are in dispute?” Jackson asked. “I had understood the whole system is such that that is exactly what the judicial function is.”

In response, Burnham said, “The Constitution recognizes the president should be independent of the Congress.” He argued that the nation’s history made clear that neither a committee nor the full House can enlist the courts to take its side against the executive branch, and that precedents from the 1970s are outdated or invalid.

Burnham said the White House’s claim of absolute immunity extended to top White House aides, whom he called “the alter ego of the president,” as well as former presidents and aides after they leave office. Such immunity goes beyond executive privilege the president might invoke to prevent aides from disclosing information in response to specific questions or topics.

Jackson expressed discomfort at how such immunity is applied when former senior officials from both parties comment regularly in the media. “Yet for some reason, he doesn’t own it for people who are talking on MSNBC all the time?” she asked. Jackson, a 2013 Obama appointee, said she would rule as quickly as possible.

The House Judiciary Committee sued Aug. 7 to enforce its April subpoena to McGahn, a key figure in special counsel Robert S. Mueller III’s investigation. The White House blocked McGahn’s testimony, advising the former counsel that he was “absolutely immune from compelled congressional testimony” and directing him not to appear.

The House asked the court to expedite the case so it could be appealed by whichever side loses

House general counsel Douglas N. Letter argued that “the Judiciary Committee cannot fulfill its constitutional investigative, oversight and legislative responsibilities — including its consideration of whether to recommend articles of impeachment — without hearing from [McGahn].”

Letter said the government’s position is “the president always wins.” He replied, “I don’t think there’s any way the Supreme Court would say, now when we’re engaged in an impeachment investigation — trying to determine if this person should no longer be president of the United States — that we cannot subpoena people” who may know whether impeachable offenses have been committed.

The lawsuit states that McGahn witnessed “nearly all of the most egregious episodes of possible presidential obstruction,” and that his statements are mentioned in the special counsel’s report more than 160 times. “McGahn is uniquely positioned to explain those events, bring additional misconduct to light, and provide evidence regarding the president’s intent,” the complaint says.

William A. Burck, McGahn’s attorney, said in a statement that McGahn will abide by the president’s instructions absent a contrary decision from the court. McGahn “has an ethical obligation to protect client confidences,” Burck said. “Don does not believe he witnessed any violation of law. And the president instructed Don to cooperate fully with the special counsel but directed him not to testify to Congress unless the White House and the committee reached an accommodation.”

In Kupperman’s case, lawyers for the Justice Department and the House said the court should essentially stay out of the dispute between the two branches and indicated they would ask the judge to dismiss the lawsuit.

House Democrats subpoenaed Kupperman on Oct. 25, to appear for a deposition Monday. Kupperman was a “close personal adviser” to Trump from January until September of this year and met with the president on a regular basis, according to the lawsuit.

He listened in on the July 25 phone call in which Trump pressed Ukrainian President Volodymyr Zelensky to investigate former vice president Joe Biden and his son Hunter Biden. Kupperman left the administration after Bolton resigned.

After receiving the House subpoena, Kupperman’s attorney, Cooper, asked the White House for guidance. White House counsel Pat Cipollone told Kupperman not to comply, saying Trump’s current and former senior advisers are “absolutely immune from compelled congressional testimony with respect to matters related to his service as a senior adviser to the President.”