
952 A.2d 56 (2008)
109 Conn.App. 125
JP MORGAN CHASE BANK, Trustee
v.
Albert S. RODRIGUES et al.
No. 28761.
Appellate Court of Connecticut.
Argued April 25, 2008.
Decided July 15, 2008.
*57 Nathalie Feola-Guerrieri, with whom, on the brief, was Daniel Shepro, Stratford, for the appellants (named defendant et al.).
Michele D. Sensale, Hartford, for the appellee (plaintiff).
BISHOP, BEACH and ROBINSON, Js.
BEACH, J.
This is a mortgage foreclosure action in which the defendants Albert Rodrigues and Marie Rodrigues[1] appeal from the judgment of the trial court granting the motion of the plaintiff, JP Morgan Chase Bank, Trustee, to strike the defendants' counterclaim, special defenses and setoffs. On appeal, the defendants claim that the court improperly granted the plaintiff's motion to strike. We affirm the judgment of the trial court and dismiss the portion of this appeal concerning the defendants' special defenses.
The following facts and procedural history are relevant to our resolution of the defendants' appeal. In September, 2004, the plaintiff filed a complaint in one count against the defendants seeking a foreclosure of a mortgage, possession of the mortgaged property, a deficiency judgment, money damages, attorney's fees, costs and interest. In its complaint, the plaintiff alleged that it was an assignee of a note and mortgage executed by the defendants *58 in favor of Citicorp Mortgage, Inc. The plaintiff further alleged that it was now the owner and holder of the note and mortgage.
In November, 2004, the defendants filed an answer, special defenses, a counterclaim and setoffs. The defendants alleged four special defenses: estoppel on the basis of the failure to honor a forbearance agreement, estoppel on the basis of a breach of the implied covenant of good faith and fair dealing in not honoring the forbearance agreement, estoppel on the basis of the failure to provide an accounting and estoppel on the basis of a breach of the forbearance agreement.
In addition, the defendants alleged a three count counterclaim and setoff. The first count of the counterclaim alleged that the defendants "entered into an agreement of forbearance with the plaintiff's predecessor in interest." This count alleged that the plaintiff "took the note and mortgage while in default subject to the forbearance agreement" and that the defendants made payments according to the forbearance agreement but that the plaintiff failed to honor the agreement. The defendants further alleged that the plaintiff at first denied that it took the mortgage subject to the forbearance agreement. When, at the insistence of the defendants' attorney, the plaintiff reviewed the agreement, it still failed to honor the agreement. It instead insisted that the defendants execute another agreement and threatened foreclosure if they did not do so even though the balance stated in that new agreement was incorrect. The defendants claimed emotional distress as a result of the claimed threats of foreclosure and the plaintiff's allegedly requiring the defendants to execute another agreement. In the second count of the counterclaim, the defendants incorporated by reference the facts set forth in the first count of the counterclaim. This second count alleged that the plaintiff acted recklessly, wantonly and without regard for, and contrary to, the forbearance agreement. This count further alleged that the plaintiff wrongfully and intentionally inflicted emotional distress on the defendants. The third count of the counterclaim likewise incorporated by reference the facts set forth in the previous counts of the counterclaim and claimed a violation of the Connecticut Unfair Trade Practices Act (CUTPA). See General Statutes § 42-110a et seq.
The plaintiff thereafter filed a motion to strike the defendants' special defenses, counterclaim and setoffs, which the court, Richards, J., granted. In response to a motion filed by the plaintiff, the court, Matasavage, J., rendered judgment on the stricken counterclaim. This appeal followed.
As a preliminary matter, we set forth the applicable standard of review. "The standard of review in an appeal challenging a trial court's granting of a motion to strike is well established. A motion to strike challenges the legal sufficiency of a pleading, and, consequently, requires no factual findings by the trial court. As a result, our review of the court's ruling is plenary. . . . We take the facts to be those alleged in the [pleading] that has been stricken and we construe the [pleading] in the manner most favorable to sustaining its legal sufficiency." (Internal quotation marks omitted.) Bernhard-Thomas Building Systems, LLC v. Dunican, 286 Conn. 548, 552-53, 944 A.2d 329 (2008).

I
We first address the threshold jurisdictional issue of whether the defendants have appealed from a final judgment. Neither side addressed this issue in its brief. We raised the issue sua sponte *59 and gave notice of this concern to the parties prior to oral argument. We conclude that the court's granting of the plaintiff's motion to strike as to the defendants' special defenses is not a final judgment.
We begin with our well settled principles relating to final judgments. "Because our jurisdiction over appeals, both criminal and civil, is prescribed by statute, we must always determine the threshold question of whether the appeal is taken from a final judgment before considering the merits of the claim." State v. Curcio, 191 Conn. 27, 30, 463 A.2d 566 (1983). "[W]e begin with the premise that, except insofar as the constitution bestows upon this court jurisdiction to hear certain cases . . . the subject matter jurisdiction of . . . this court is governed by statute. . . . It is equally axiomatic that, except insofar as the legislature has specifically provided for an interlocutory appeal or other form of interlocutory appellate review . . . appellate jurisdiction is limited to final judgments of the trial court." (Citations omitted; internal quotation marks omitted.) Doe v. Connecticut Bar Examining Committee, 263 Conn. 39, 45, 818 A.2d 14 (2003).
"The granting of a motion to strike a special defense is not a final judgment and is therefore not appealable. . . . The striking of special defenses neither terminates a separate proceeding nor so concludes the rights of the parties that further proceedings cannot affect them." (Citation omitted; internal quotation marks omitted.) Mechanics Savings Bank v. Townley Corp., 38 Conn.App. 571, 573, 662 A.2d 815 (1995). Accordingly, we cannot consider that portion of the defendants' appeal that pertains to the striking of their special defenses. That issue must await review, if at all, in an appeal from the final decision on the merits of the case. See id., at 574, 662 A.2d 815.
Accordingly, we dismiss, sua sponte, the portion of the defendants' appeal that pertains to the court's granting of the plaintiff's motion to strike the defendants' special defenses.

II
The defendants claim that the court improperly granted the plaintiff's motion to strike because a motion to strike is not the proper vehicle through which to address a counterclaim that is legally insufficient.[2] Specifically, the defendants claim that instead of filing a motion to strike, the plaintiff should have filed a request to revise under Practice Book § 10-35 et seq. We disagree.
Pursuant to Practice Book § 10-39(a)(5), when a party seeks to contest the "legal sufficiency of any answer to any complaint, counterclaim or cross complaint, or any part of that answer including any special defense contained therein, the party may do so by filing a motion to strike the contested pleading or part thereof." "The purpose of a motion to strike is to contest . . . the legal sufficiency of the allegations of any [complaint] to state a claim upon which relief can be granted." (Internal quotation marks omitted.) Peter-Michael, Inc. v. Sea Shell Associates, 244 Conn. 269, 270, 709 A.2d 558 (1998). "[A] counterclaim is a cause of action existing *60 in favor of the defendant against the plaintiff and on which the defendant might have secured affirmative relief had he sued the plaintiff in a separate action. . . . A motion to strike tests the legal sufficiency of a cause of action and may properly be used to challenge the sufficiency of a counterclaim." (Citations omitted; internal quotation marks omitted.) Fairfield Lease Corp. v. Romano's Auto Service, 4 Conn. App. 495, 496, 495 A.2d 286 (1985); see also Practice Book § 10-39. Accordingly, we conclude that a motion to strike was the proper procedural vehicle to test the sufficiency of the defendants' counterclaim.

III
The defendants claim that the court improperly granted the plaintiff's motion to strike their counter-claim and setoffs. We disagree.
The court granted the plaintiff's motion to strike the defendants' counterclaim. It concluded, inter alia, that it did not arise from the same transaction as the complaint. Practice Book § 10-10 provides that "[i]n any action for legal or equitable relief, any defendant may file counterclaims against any plaintiff . . . provided that each such counterclaim . . . arises out of the transaction or one of the transactions which is the subject of the plaintiff's complaint. . . ." This section "is a common-sense rule designed to permit the joinder of closely related claims where such joinder is in the best interests of judicial economy." (Internal quotation marks omitted.) Atlantic Richfield Co. v. Canaan Oil Co., 202 Conn. 234, 251, 520 A.2d 1008 (1987). "The transaction test is one of practicality, and the trial court's determination as to whether that test has been met ought not be disturbed except for an abuse of discretion." (Internal quotation marks omitted.) Mechanics Savings Bank v. Townley Corp., supra, 38 Conn.App. at 574, 662 A.2d 815.
Here, the subject of the plaintiff's complaint is the foreclosure of a mortgage from the plaintiff on property at 101 Northwood Drive in the town of Easton. The transaction at issue in the complaint is the execution of the note and mortgage and the subsequent default.
We turn to the first and second counts of the defendants' counterclaim, which alleged emotional distress. In these counts, the defendants alleged that the plaintiff at first denied that it took the note subject to the forbearance agreement. When, at the insistence of the defendants' attorney, it reviewed the agreement, it still failed to honor it. Rather, it insisted that the defendants execute another agreement and threatened foreclosure if they did not do so, even though the balance in that new agreement was incorrect. The defendants claimed emotional distress as a result of the claimed threats of foreclosure and the plaintiff's alleged requirement that the defendants execute another agreement. These allegations of emotional distress relate to the behavior of the plaintiff and do not pertain to the specific subject of the plaintiff's complaint.
In Southbridge Associates, LLC v. Garofalo, 53 Conn.App. 11, 21, 728 A.2d 1114, cert. denied, 249 Conn. 919, 733 A.2d 229 (1999), a panel of this court held that the trial court did not abuse its discretion in determining that the defendants' counterclaim alleging violation of the implied covenant of good faith and fair dealing or breach of fiduciary duty did not arise out of the same transaction as the complaint, as required by Practice Book § 10-10. The defendants' allegations related to the conduct of an assignee of the subject notes and mortgage in selling the notes to the plaintiff for an amount less than that which the named defendant was willing to pay. *61 Southbridge Associates, LLC v. Garofalo, supra, at 15, 728 A.2d 1114. This conduct occurred well after the loan documents were executed and, as such, did not relate precisely to the making, validity and enforcement of the notes. Id., at 17, 728 A.2d 1114. The trial court, then, did not abuse its discretion by rendering summary judgment for the plaintiff on the defendants' counterclaim in the foreclosure action. Id., at 21, 728 A.2d 1114.
In the present case, the defendants' allegations related to the conduct of the plaintiff that occurred after the execution of the mortgage note and with respect to documents other than the mortgage note. The disparity between the subject matter of the plaintiff's complaint and that of the defendants' counterclaim warranted the court's conclusion that the counterclaim did not arise from the same transaction. Accordingly, the court did not abuse its discretion in striking the defendants' counterclaim for emotional distress.
We next address the defendants' third counterclaim, which alleges a violation of CUTPA. In a foreclosure action, a counterclaim must relate to the making, validity or enforcement of the mortgage note in order properly to be joined with the complaint. See New Haven Savings Bank v. LaPlace, 66 Conn.App. 1, 9-11, 783 A.2d 1174 (trial court properly rendered summary judgment against defendant on ground that counterclaim not related to making, validity or enforcement of mortgage note), cert. denied, 258 Conn. 942, 786 A.2d 426 (2001); see also Southbridge Associates, LLC v. Garofalo, supra, 53 Conn.App. at 16-17, 728 A.2d 1114. There are instances in which violations of CUTPA have been upheld as valid counterclaims brought in foreclosure actions. See Cheshire Mortgage Service, Inc. v. Montes, 223 Conn. 80, 105-15, 612 A.2d 1130 (1992); Monetary Funding Group, Inc. v. Pluchino, 87 Conn.App. 401, 412-15, 867 A.2d 841 (2005).
The defendants incorporate by reference into this counterclaim the same factual allegations set forth in their counterclaim for emotional distress. The defendants additionally state that the plaintiff's conduct was "grossly unfair, in bad faith, and recklessly wrongful." The defendants alleged that the plaintiff failed to honor the forbearance agreement. They further alleged that the plaintiff threatened foreclosure if the defendants did not execute another agreement with an incorrect balance. These allegations pertain to a range of the plaintiff's conduct in connection with the forbearance agreement and the additional agreement rather than narrowly bearing on the mortgage note itself or its enforcement.
In foreclosure actions, the mortgagee's conduct in the making of the mortgage note has been held to constitute a violation of CUTPA. See Monetary Funding Group, Inc. v. Pluchino, 87 Conn.App. 401, 867 A.2d 841; see also Cheshire Mortgage Service, Inc. v. Montes, 223 Conn. 80, 612 A.2d 1130.[3] Conduct on the part of the *62 party seeking foreclosure that occurred after the loan documents were executed and not necessarily directly related solely to enforcement of the note, however, properly has been found not to arise out of the same transaction as the complaint. See Southbridge Associates, LLC v. Garofalo, supra, 53 Conn.App. at 16-21, 728 A.2d 1114. It was within the court's discretion to conclude that the plaintiff's conduct as alleged in the counterclaim was not part of the same transaction as alleged in the complaint.[4]
That portion of the defendants' appeal that pertains to their special defenses is dismissed; the judgment striking the defendants' counterclaim is affirmed.
In this opinion the other judges concurred.
NOTES
[1]  The plaintiff also named as defendants the United States of America, the Internal Revenue Service, the state department of revenue services, Sam Melilli and Esther Melilli. At issue in this appeal is the plaintiff's motion to strike the special defenses, counterclaim and setoffs of Albert Rodrigues and Marie Rodrigues. The term "defendants" therefore refers to Albert Rodrigues and Marie Rodrigues only.
[2]  Practice Book § 61-3 provides in relevant part: "A judgment disposing of only a part of a complaint, counterclaim, or cross complaint is a final judgment if that judgment disposes of all causes of action in that complaint, counterclaim, or cross complaint brought by or against a particular party or parties. . . ." This section allows an appeal when an entire counterclaim has been stricken and judgment has been rendered thereon. Mechanics Savings Bank v. Townley Corp., supra, 38 Conn. App. at 574, 662 A.2d 815. We will, therefore, review the judgment on the counterclaim.
[3]  Although Monetary Funding Group, Inc. v. Pluchino, 87 Conn.App. 401, 867 A.2d 841, and Cheshire Mortgage Service, Inc. v. Montes, 223 Conn. 80, 612 A.2d 1130, do not address the issue of whether the CUTPA counterclaim involved meets the transaction test set forth in Practice Book § 10-10, they, nevertheless give us guidance in what constitutes a valid CUTPA counterclaim in a foreclosure action. In Monetary Funding Group, Inc., the plaintiff mortgagee misled the unsophisticated defendant regarding the interest rate on the note and the amount of fees involved in the transaction and had structured the transaction to require two loans for the purpose of maximizing fees that could not have been demanded as part of a single loan transaction. We concluded that the trial court properly determined that the plaintiff violated CUTPA on the basis of its conduct in securing the mortgage note, namely that it had unclean hands and had made an unconscionable loan. Monetary Funding Group, Inc. v. Pluchino, supra, at 412-15, 867 A.2d 841.

In Cheshire Mortgage Service, Inc. v. Montes, supra, 223 Conn. at 80, 612 A.2d 1130, our Supreme Court reversed the trial court's judgment of foreclosure, determined that the mortgagee plaintiff had violated the federal Truth in Lending Act (act) by failing accurately to disclose and by including, in the finance charge, the fees charged to the defendants to record a future assignment of the mortgage, and had violated General Statutes (Rev. to 1991) § 36-224l by having included the prepaid finance charge in the principal amount of the loan rather than categorizing it as interest. Cheshire Mortgage Service, Inc. v. Montes, supra, at 94-106, 612 A.2d 1130. The plaintiff's violation of both § 36-224l and the act constituted an unfair trade practice under CUTPA. Id., at 105-15, 612 A.2d 1130.
[4]  We conclude that the court did not improperly exercise its discretion in determining that the defendants' counterclaim under CUTPA and for emotional distress did not relate to the subject matter of the complaint. "[B]ecause a mortgage foreclosure action is an equitable proceeding, the trial court may consider all relevant circumstances to ensure that complete justice is done." (Internal quotation marks omitted.) Morgera v. Chiappardi, 74 Conn.App. 442, 457, 813 A.2d 89 (2003). We make no determination as to the validity of the merits of these claims.

Similarly, we express no opinion on, but leave to another day, the question of whether an abrogation of a forbearance agreement may properly constitute a special defense to a foreclosure action on the ground that it relates to the enforcement of the note.
