Lawyers for two former high-level Trump administration officials were in court Thursday in legal battles that center on whether they will have to testify in the House impeachment inquiry and test the limits of immunity claims for presidential advisers.

Both cases come down to whether the two former aides — White House counsel Donald McGahn and deputy national security adviser Charles Kupperman — will have to show up to testify on Capitol Hill in response to Congressional subpoenas.

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 and is instead awaiting direction from U.S. District Judge Richard J. Leon, who set a hearing in the matter for Dec. 10.

In court Thursday, 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. House investigators have asked Bolton to testify before two committees next week, but Cooper said Bolton has not yet received a subpoena.

The two cases set up a separation-of-powers test between the White House and Congress that could affect other impeachment-related testimony.

“Absent a definitive judgment from the Judicial Branch,” Kupperman’s lawyers said in the lawsuit, “Plaintiff will effectively be forced to adjudicate the constitutional dispute himself, and if he judges wrongly, he will inflict grave constitutional injury on either the House or the President.”

House Democrats subpoenaed Kupperman on Oct. 25, to appear for a deposition Monday. Kupperman was a “close personal advisor” 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, Charles Cooper — who also represents Bolton — 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.”

When Kupperman did not appear on Capitol Hill on Monday, House Intelligence Committee Chairman Adam B. Schiff (D-Calif.) said the former Trump adviser had “no basis in law” to skip the deposition.

The Justice Department’s Office of Legal Counsel has for decades, during administrations of both parties, said the president and his immediate advisers cannot be compelled to testify on matters related to their official duties. But Kupperman’s lawsuit also points to a 2008 case in which a federal judge in Washington said “absolute immunity” has some limits in a congressional inquiry. In that case, the inquiry did not involve national security or foreign affairs, which are at the heart of the House impeachment inquiry.

In a letter to Kupperman’s lawyers, House Democratic leaders said Justice Department opinions are not binding on Congress or the courts. The president, they wrote, has no “authority to direct the conduct of private citizens who are no longer his subordinates — much less to direct them to defy a lawful command from a coequal branch of government.”

Kupperman’s attorney emphasized in response that it is not Kupperman who disagrees with the House position but Trump — and the presidents before him who have claimed immunity. Kupperman will comply, his lawyer wrote, if the judge determines he must.

Leon, who is presiding over Kupperman’s case, was nominated by President George W. Bush in 2001, and is known for his colorful language and unpredictable decisions. He brings to the bench years of experience in government — as a Justice Department attorney and lawyer for congressional committees investigating three sitting presidents. The judge also has taught a Georgetown Law School class for many years on congressional investigations with John Podesta, an adviser to Democratic presidents.