OPINION
ROTH, Circuit Judge:This case presents the question whether the parties’ Agreement is an executory contract. EnerSys Delaware, Inc., appeals the judgment of the District Court, which affirmed the Bankruptcy Court’s order that the Agreement was an executory contract, subject to rejection under 11 U.S.C. § 365(a), and that Exide Technologies could reject it. We conclude, however, that EnerSys has substantially performed the Agreement. As a result, EnerSys does not have any unperformed material obligations that would excuse Exide from performance. We hold, therefore, that the Agreement is not an executory contract. We will vacate the District Court’s order and remand this case to the District Court with instructions to remand it to the Bankruptcy Court for further proceedings consistent with this opinion.
I. BACKGROUND
A. Factual background
On April 15, 2002, Exide filed a voluntary petition for bankruptcy protection under Chapter 11 of the Bankruptcy Code, 11 U.S.C § 1101, et seq. After filing for bankruptcy, Exide sought to reject various agreements that it had with EnerSys arising from their June 1991 transaction. In June 1991, Exide sold substantially all of its industrial battery business to EnerSys for about $135 million.1 The assets that Exide sold to EnerSys included physical manufacturing plants, equipment, inventory, and certain items of intellectual property. To formalize the sale, Exide and En-erSys entered into over twenty-three agreements. Four of these agreements constitute the crux of the dispute: (1) the *961Trademark and Trade Name License Agreement, (2) the Asset Purchase Agreement, (3) the Administrative Services Agreement, and (4) a letter agreement. The Bankruptcy Court held, in an order predating the order challenged here, that the four agreements constituted a single integrated Agreement (the Agreement). In re Exide Techs., 340 B.R. 222, 227 (Bankr.D.Del.2006). Neither Exide nor EnerSys have challenged this determination. We therefore take the next step of determining whether the Agreement is an executory contract.
Under the Agreement, Exide licensed its “Exide” trademark to EnerSys for use in the industrial battery business. Exide wanted to continue to use the Exide mark outside of the industrial battery business. To accommodate the needs of both parties, Exide granted EnerSys a perpetual, exclusive, royalty-free license to use the Exide trademark in the industrial battery business. This division worked, and, for almost ten years, each party appeared satisfied with the results of the transaction.
In 2000, however, Exide expressed a desire to return to the North American industrial battery market. After the parties agreed to the early termination of a ten-year noncompetition Agreement (thus granting Exide permission to reenter the market), Exide made several attempts to regain the trademark from EnerSys, but EnerSys refused. Exide wanted to regain the mark as a part of its strategic goal to unify its corporate image. Exide hoped to use a single name and trademark on all the products that it produced; this single name and trademark were, naturally, “Ex-ide.”
Exide reentered the industrial battery business by purchasing GNB Industrial Battery Company. Exide, however, remained bound by the ongoing obligation to forbear from using the Exide trademark in that business for as long as the license continued in effect. Thus, from 2000 until Exide filed for bankruptcy protection in 2002, Exide was forced to compete directly against EnerSys, which was selling batteries under the name “Exide.” Then, when Exide filed for bankruptcy under Chapter 11, Exide was presented the opportunity to try to regain the Exide trademark by rejecting the Agreement. Exide sought the Bankruptcy Court’s approval to do so.
B. Bankruptcy and District Court Proceedings
On April 3, 2006, the Bankruptcy Court entered an order granting Exide’s motion to reject the Agreement. The court held that the Agreement was an executory contract, subject to rejection under 11 U.S.C. § 365(a), and that rejection terminated Exide’s obligations under it. About three months later, on July 11, the Bankruptcy Court entered an order approving the transition plan and denying EnerSys’s motion to stay. EnerSys appealed these two orders to the District Court. The District Court, on February 27, 2008, affirmed the Bankruptcy Court’s orders.
EnerSys appeals the District Court’s order, arguing two issues: (1) the District Court erred in holding that Agreement was an executory contract, and (2) it erred in holding that rejection terminates Ener-Sys’s rights under the Agreement.
II. DISCUSSION
The Bankruptcy Court had jurisdiction under 28 U.S.C. §§ 157(a) and 1334(b). The District Court had jurisdiction to decide EnerSys’s appeal under 28 U.S.C. § 158(a). We have jurisdiction under 28 U.S.C. §§ 158(d) and 1291 to review the District Court’s final order.
We exercise plenary review of an order from a district court sitting as an *962appellate court in review of a bankruptcy-court. E.g., In re CellNet Data Sys., Inc., 327 F.3d 242, 244 (3d Cir.2003). We will review both courts’ legal conclusions de novo. Id.; In re Gen. DataComm Indus., Inc., 407 F.3d 616, 619 (3d Cir.2005). Furthermore, we will set aside a bankruptcy court’s factual findings only if clearly erroneous. In re CellNet Data, 327 F.3d at 244. For mixed questions of law and fact, we will engage in “a mixed standard” of review, “affording a clearly erroneous standard to integral facts, but exercising plenary review of the lower court’s interpretation and application of those facts to legal precepts.” Id.
A. Executory contract
The policy behind Chapter 11 of the Bankruptcy Code is the “ultimate rehabilitation of the debtor.” Nicholas v. United States, 384 U.S. 678, 687, 86 S.Ct. 1674, 16 L.Ed.2d 853 (1966). The Code therefore allows debtors in possession, “subject to the court’s approval, ... [to] reject any executory contract or unexpired lease of the debtor.” 11 U.S.C. § 365(a). But the Bankruptcy Code does not define “executory contract.” Relevant legislative history demonstrates that Congress intended the term to mean a contract “on which performance is due to some extent on both sides.” H.R.Rep. No. 95-595, 347 (1977), 1978 U.S.C.C.A.N. 5787, 5963; see In re Columbia Gas Sys. Inc., 50 F.3d 233, 238 (3d Cir.1995).
With congressional intent in mind, this Court has adopted the following definition: “ ‘An executory contract is a contract under which the obligation of both the bankrupt and the other party to the contract are so far underperformed that the failure of either to complete performance would constitute a material breach excusing the performance of the other.’ ” In re Columbia Gas, 50 F.3d at 239 (alteration omitted) (quoting Sharon Steel Corp. v. Nat’l Fuel Gas Distrib. Corp., 872 F.2d 36, 39 (3d Cir.1989)).2 “Thus, unless both parties have unperformed obligations that would constitute a material breach if not performed, the contract is not executory under § 365.” In re Columbia Gas, 50 F.3d at 239. The party seeking to reject a contract bears the burden of demonstrating that it is executory. And “[t]he time for testing whether there are material unperformed obligations on both sides is when the bankruptcy petition is filed.” Id. at 240. Finally, to conduct this determination, we “consider contract principles under relevant nonbankruptcy law.” Id. at. 240 n. 10; see In re Gen. DataComm, 407 F.3d at 623. New York, because it is the forum selected in the Agreement’s choice-of-law provision, provides the relevant non-bankruptcy law.
Accordingly, our inquiry is to determine whether the Agreement, on April 15, 2002, contained at least one obligation for both Exide and EnerSys that would constitute a material breach under New York law if not performed. If not, then the Agreement is not an executory contract.3 See In re Gen. DataComm, 407 F.3d at 623.
Under New York law, a material breach, which “justifies] the other party to suspend his own performance,” is “a breach which is so substantial as to defeat the purpose of the entire transaction.” Lipsky v. Commonwealth United Corp., 551 F.2d 887, 895 (2d Cir.1976) (cita*963tion omitted); see In re Lavigne, 114 F.3d 379, 387 (2d Cir.1997):
[U]nder New York law, only a breach in a contract which substantially defeats the purpose of that contract can be grounds for rescission. The non-breaching party will be discharged from the further performance of its obligations under the contract when the breach goes to the root of the contract.
Id. (internal quotation marks omitted).
But when a breaching party “has substantially performed” before breaching, “the other party’s performance is not excused.” Hadden v. Consolidated Edison Co., 34 N.Y.2d 88, 356 N.Y.S.2d 249, 312 N.E.2d 445, 449 (1974); see Merrill Lynch & Co. Inc., v. Allegheny Energy, Inc., 500 F.3d 171, 186 (2d Cir.2007).
New York’s high court has instructed how to determine when a party has rendered substantial performance:
There is no simple test for determining whether substantial performance has been rendered and several factors must be considered, including the ratio of the performance already rendered to that unperformed, the quantitative character of the default, the degree to which the purpose behind the contract has been frustrated, the willfulness of the default, and the extent to which the aggrieved party has already received the substantial benefit of the promised performance.
Hadden, 356 N.Y.S.2d 249, 312 N.E.2d at 449. “The issue of whether a party has substantially performed is usually a question of fact and should be decided as a matter of law only where the inferences are certain.” Merrill Lynch & Co. Inc., 500 F.3d at 186 (citing Anderson Clayton & Co. v. Alanthus Corp., 91 A.D.2d 985, 457 N.Y.S.2d 578, 579 (1983)).
The Bankruptcy Court here failed to properly measure whether either party had substantially performed. Our inspection of the record, however, reveals that the inferences are clear that EnerSys has substantially performed. Applying Had-den's, balancing test, EnerSys’s performance rendered outweighs its performance remaining and the extent to which the parties have benefitted is substantial. Specifically, EnerSys has substantially performed by paying the full $135 million purchase price and operating under the Agreement for over ten years. EnerSys has been producing industrial batteries since 1991, using all the assets transferred under the Agreement, including real estate, real-estate leases, inventory, equipment and the right to use the trademark “Exide.” Moreover, EnerSys has provided Exide with the substantial benefit of assuming the latter’s liabilities, including numerous contracts and accounts receivable, within the business EnerSys purchased.
Exide argues that EnerSys’s ongoing, unperformed obligations outweigh its performance. It relies on the following four obligations of EnerSys: (1) an obligation to satisfy the Quality Standards Provision, and obligations to observe (2) the Use Restriction, (3) the Indemnity Obligations, and (4) the Further Assurances Obligations.4 We reject Exide’s argument; these four obligations do not outweigh the substantial performance rendered and benefits received by EnerSys.
First, EnerSys’s obligation to observe the Use Restriction, i.e., not to use the Trademark outside the industrial battery business, is not a material' obligation because it is a condition subsequent that requires EnerSys to use the mark in ac*964cordance with the terms of the Trademark Licence. A condition subsequent is not a material obligation. See In re Columbia Gas System, Inc., 50 F.3d 233, 241 (3d Cir.1995) (“Non-occurrence of a condition is not a breach by a party unless he is under a duty that the condition occur.” (quoting Restatement (Second) of CONTRACTS § 225(3) (1981))). Moreover, the Use Restriction does not relate to the purpose of the Agreement — which is that Ex-ide would transfer its industrial battery business and the concomitant assets and liabilities to EnerSys and EnerSys in exchange would pay Exide about $135 million. Therefore, even if the obligation were not a condition subsequent, it nevertheless would not affect the substantial performance of the Agreement.
Second, EnerSys’s obligation to observe the Quality Standards Provision is minor because it requires meeting the standards of the mark for each battery produced; it does not relate to the transfer of the industrial battery business. Furthermore, the record reveals that Exide never provided EnerSys with any quality standards. (J.A. 297.) The parties, in fact, do not ever seem to have discussed any such standards. (See id. at 321-22.) It is an untenable proposition to find an obligation to go to the very root of the parties’ Agreement when the parties themselves act as if they did not know of its existence.
Finally, the other two obligations that Exide argues are substantial, the Indemnity Obligation and the Further Assurances Obligation, do not outweigh the factors supporting substantial performance. In regard to the Indemnity Obligation, under the Asset Purchase Agreement, all representations and warranties arising from it expired in 1994, on the third anniversary of the closing and Exide did not present any evidence that any liability assumed by EnerSys was still pending. Similarly, under the Further Assurances Obligation, EnerSys agreed to cooperate to facilitate the 1991 transaction. Exide has identified no remaining required cooperation.
Exide argues, however, citing Hadden, that the substantial-performance doctrine is “irrelevant here” because it applies only in cases involving construction or employment contracts. See Hadden, 356 N.Y.S.2d 249, 312 N.E.2d at 449. Our review of New York law reveals that no New York court has held (or even intimated, see id.) that the doctrine should be confined to the construction/employment contract areas. Indeed, the Second Circuit Court of Appeals, applying New York law, recently applied Hadden’s substantial-performance doctrine in a $490 million asset-purchase contract that formalized the sale of an energy trading commodities business to a larger energy business. See Merrill Lynch, 500 F.3d at 186. That contract was neither a construction nor employment contract. We also now conclude that we will not confine the doctrine to construction and employment contract cases.
III. CONCLUSION
For the reasons stated above, we have determined that the Agreement is not an executory contract because it does not contain at least one ongoing material obligation for EnerSys. Because the Agreement is not an executory contract, Exide cannot reject it. We will vacate the District Court’s order and remand this case to it for remand to the Bankruptcy Court for further proceedings consistent with this opinion.
. EnerSys was known then as Yuasa Battery (America), Inc.
. Professor Vern Countryman, a leading bankruptcy scholar, created and advocated this definition in a law-review article. See Sharon Steel Corp., 872 F.2d at 39 (citing Countryman, Executory Contracts in Bankruptcy: Parti, 57 Minn. L.Rev. 439(1973)).
. There is no remaining contention made that Exide had any unperformed obligations.
. Exide does not argue in its Brief that other obligations, set out by the Bankruptcy Court, such as the pension obligation, are substantially unperformed.