The question brought to the Court by this appeal is whether the superior court had jurisdiction under the Declaratory Judgment Act, N.C.G.S. § 1-253 et seq., to determine the validity of laws adopted by the General Assembly to provide that Craven County *559shall administer building and safety codes inside the city limits of New Bern. N.C.G.S. § 1-254 provides in part:
Any person interested under a deed, will, written contract or whose rights, status or other legal relations are affected by a statute, municipal ordinance, contract or franchise, may have determined any question of construction or validity arising under the instrument, statute, ordinance, contract, or franchise, and obtain a declaration of rights, status, or other legal relations thereunder.
We have held that in order to invoke the provisions of the Declaratory Judgment Act there must be a justiciable controversy between the parties. Sharpe v. Park Newspapers of Lumberton, 317 N.C. 579, 347 S.E.2d 25 (1986); State ex rel. Edmisten v. Tucker, 312 N.C. 326, 323 S.E.2d 294 (1984); Lide v. Mears, 231 N.C. 111, 56 S.E.2d 404 (1949).
In this case the plaintiff is attempting to have determined its rights or status as affected by three statutes. The plaintiff contests the validity of these statutes. This would appear to make the plaintiffs claim cognizable under N.C.G.S. § 1-254.
The defendants contend the plaintiff’s claim is not cognizable because there is not a real controversy between the parties. They say that it is the prerogative of the State to confer the right to enforce building codes and fire and safety codes. This being so, say the defendants, the plaintiff does not have a vested right in the enforcement of the codes and without this right there cannot be a controversy. We do not believe the question of whether there is an actual controversy depends on the existence of a vested right. The plaintiff had the right to enforce the codes prior to the action by the General Assembly. This change in status may be determined under the Declaratory Judgment Act. See Board of Health v. Comrs. of Nash, 220 N.C. 140, 16 S.E.2d 677 (1941), in which this Court held that an act which gave the county commissioners the power to veto the appointment of a health officer by the county board of health could be challenged under the Declaratory Judgment Act. The controversy between the parties in this case is more than a mere difference of opinion as contended by the defendants. A right which previously belonged to the plaintiff has been removed. The plaintiff may challenge this removal.
The defendants would distinguish Town of Emerald Isle v. State of N.C., 320 N.C. 640, 360 S.E.2d 756 (1987), and Board of *560Managers v. Wilmington, 237 N.C. 179, 74 S.E.2d 749 (1953), on the ground that a duty was imposed on the two municipalities in those cases. It is true that no duty was imposed on the plaintiff by the three acts in question in this case. That is not the test. The plaintiff’s status was changed by the acts of the General Assembly. The plaintiff may challenge this change of status by an action for a declaratory judgment.
Finally the defendants, relying on Sharpe v. Park Newspapers of Lumberton, 317 N.C. 579, 347 S.E.2d 25, Gaston Bd. of Realtors v. Harrison, 311 N.C. 230, 316 S.E.2d 59 (1984), and Consumers Power v. Power Co., 285 N.C. 434, 206 S.E.2d 178 (1974), say that in order to invoke the Declaratory Judgment Act litigation must appear unavoidable, which is not so in this case. In each of these cases we said that to satisfy the jurisdictional requirements of an actual controversy, it is necessary that litigation appear unavoidable. Sharpe v. Park Newspapers of Lumberton, 317 N.C. 579, 589, 347 S.E.2d 25, 32; Gaston Bd. of Realtors v. Harrison, 311 N.C. 230, 232, 316 S.E.2d 59, 61; Consumers Power v. Power Co., 285 N.C. 434, 450, 206 S.E.2d 178, 189. We have not as yet defined what is meant by “unavoidable.” It cannot mean that there is no way in which litigation can be avoided. One party can always avoid litigation by not bringing an action or by not resisting his opponent’s claim.
In Gaston Bd. the plaintiff Board of Realtors brought an action for a declaratory judgment to have the court determine whether it had conducted lawful disciplinary proceedings against one of its members. The evidence showed there was a good chance the member would not sue the Board but would abide by the decision and seek reinstatement. In Sharpe the plaintiffs brought an action for a declaratory judgment that they were not bound by a covenant not to compete with the defendant in the newspaper business. The evidence showed the plaintiffs had no immediate intention of entering business in competition with the defendant. In Consumers Power the City of Shelby entered into a contract with North Carolina Consumers Power, Inc. to build a plant for the generation of electric power for the City. The City and Consumers Power brought a declaratory judgment action against Duke Power Company. They alleged that Duke had committed itself to oppose the construction of the facilities and they prayed that the contract be declared valid. This Court said the complaint revealed that there was not a practical certainty that the plaintiffs had the capaci*561ty to perform the contract. This Court held that the superior court was correct in dismissing the action because there was not a justiciable controversy.
In the three cases, Sharpe, Gaston Bd., and Consumers Power, in which we said that litigation did not appear to be unavoidable, there was an impediment to be removed before court action could be started. In this case there is no such impediment. The County contends it has the right to enforce certain laws. The City says the County does not have the right. This is a justiciable controversy which may be determined by a declaratory judgment action.
For the reasons stated in this opinion, we reverse and remand to the Superior Court of Craven County for further proceedings.
Reversed and remanded.