Appellees, members of the Oklahoma Motor Vehicle Commission (OMVC), demurred to the second amended petition of appellant Chrysler Corporation. This demurrer was sustained and, upon appellant’s election to stand upon that pleading, the cause was dismissed.
Appellant’s second amended petition, which is the pleading at issue in this case, was found by the trial court to fail to present an actual controversy within the meaning of 12 O.S.1981 § 1651.1 In the case of Gordon v. Followell,2 this Court established principles for determining the adequacy of a petition in a declaratory judgment action. In doing so, we adopted the following quotation:3
“The requisite precedent facts or conditions which the courts generally hold must exist in order that declaratory relief may be obtained may be summarized as follows: (1) there must exist a justicia-ble controversy; that is to say, a controversy in which a claim of right is asserted against one who has an interest in contesting it; (2) the controversy must be between persons whose interests are adverse; (3) the party seeking declaratory relief must have a legal interest in the controversy, that is to say, a legally pro-tectible interest; and (4) the issue involved in the controversy must be ripe for judicial determination.”
Appellant’s second amended petition, in essence, alleges that appellant is a new car manufacturer, and that appellant engages in the marketing of the vehicles it manufactures through a system of dealership agreements. Appellant states that these dealership arrangements provide a nonexclusive area of responsibility to the new car dealer. In the normal course of business appellant engages in the appointment of new dealers and the termination of old. Under 47 O.S.1981 § 578, appellant is required to give notice of intent to establish a new dealership to existing dealers of the same line-make within ten miles of the proposed new dealership. If an existing dealer protests, appellant is prohibited from establishing that new dealership pending a hearing and determination by OMVC as to whether good cause exists not to permit the establishment. Following the OMVC determination, the statutory scheme4 providing for notice, protest and hearing allows a review by trial de novo in a district court of competent jurisdiction.5
Appellant goes on to allege that it has twice attempted to establish a new dealership in Tulsa, Oklahoma. In both instances appellant has complied with the provisions of section 578. In both instances a previously existing dealer of the same line-make *111has protested appellant’s plans. In the first instance the protestor prevailed and appellant initiated proceedings for review. In the second instance appellant prevailed and the protestor initiated proceedings for review. In both instances appellant lost the opportunity to establish the desired dealerships while review proceedings were pending, thus effectively mooting those proceedings.
Appellant alleges a continuing desire to establish a new dealership in the Tulsa area but contends that compliance with the terms of section 578 effectively denies it the opportunity to exercise such a business decision. Appellant also states that to act in defiance of this provision would subject it to the sanctions provided in 47 O.S.1981 § 580.
Following this assertion of background facts appellant presents allegations supporting its contentions that sections 578 through 580.1 are repugnant to the due process provisions of the Fourteenth Amendment to the United States Constitution, to the Interstate Commerce Clause of the Constitution, to 15 U.S.C. § 1 and to the provisions of the Oklahoma Constitution prohibiting monopolies and restraints of trade.6 And finally, appellant asserts that the statutory scheme is in violation of the doctrine of separation of powers.
In its prayer for relief appellant requests declaratory judgment that the challenged statutory provisions7 are unconstitutional and void on their face and as applied to appellant.
The office of a demurrer is to test the sufficiency of a petition.8 In this case the question is whether appellant’s second amended petition sets forth facts sufficient to invoke the court’s jurisdiction under the declaratory judgments act.9 As atated previously, four elements must be shown to exist to give rise to this jurisdiction. We shall examine the petition with these elements in mind.
First, there must exist a justiciable controversy, which has been stated to be a controversy in which a claim of right is asserted against one who has an interest in contesting it. In the present case appellant claims the right to establish a new car dealership without submitting to the supervision of OMVC. OMVC clearly has an interest in controverting this proposed erosion of its authority. The first element is clearly present.
Second, the controversy tendered for adjudication must be between parties whose interests are adverse. This element also is clearly present. Appellant here indicates that its best interest lies in not being subject to regulation in its marketing decisions regarding establishment of new dealerships. The State of Oklahoma has found its interests to lie in the regulation of such activities.10 The vehicle for this regulation is OMVC. OMVC is thus a proper adversary to contend against appellant’s assertions in this case.
Third, the party seeking declaratory relief must have a legally protectible interest in the controversy. The nature of the interest which appellant claims is its right to engage in a vital part of its normal business activities. We clearly perceive this right to be one subject to legal protection.
Finally, the issue involved in the controversy must be ripe for judicial determination. This appears to be the point upon which the trial court found the present controversy to be lacking. OMVC in the trial court, and here on appeal, presented the argument that appellant’s failure to follow the notice, hearing and appeal procedures provided under 47 O.S.1981, §§ 578 through 580.1, and to present the issues raised here through an appeal at that juncture, prevents consideration of appellant’s challenge to the constitutionality of the requirement that it proceed under those provisions in establishing its proposed new dealership.
*112In its argument in this Court in support of the trial court’s ruling OMVC relies on two cases. The older case, Shinn v. Oklahoma City,11 as will be discussed within, we do not find to support OMVC’s argument. This leaves the second case cited, Semke v. State ex rel. Oklahoma Motor Vehicle Commission12 and a case considered in our own research, Bradbury v. Oklahoma State Board of Chiropody13 as ostensibly supporting the OMVC position. In both of these cases this Court indicated that the appellant’s failure to apply for a required license prevented consideration of their attempted challenges to the constitutionality of certain requirements which were imposed in order to qualify for a license.14 In terms of ripeness doctrine these cases indicate that a proper case for consideration has not been presented until a right or privilege has been denied.15 As the right or privilege in question in those cases was the right to a license, the failure to be denied prevented consideration.
However, it appears that in the present case the true thrust of appellant’s arguments deal not with the question of its right to obtain permission from OMVC to establish a new dealership, but rather whether the legislation is constitutional in requiring it to submit to the proceedure through which that permission may or may not be obtained. In this regard we find the cases of Shinn v. Oklahoma City,16 and Thrasher v. Board of Governors17 to be on point. In both of these cases parties claiming to be affected by regulatory schemes18 brought actions to enjoin enforcement on the grounds of alleged unconstitutionality. In both cases this Court stated that the parties seeking relief did not have standing to challenge features of the regulatory scheme dealing with disciplinary actions applicable to licensees, as the parties to the actions had not attempted to obtain licenses. In such a situation, this Court noted, that question would be in a purely hypothetical form and not suitable for consideration.19 The Court did, however, consider the challenges as to the constitutionality of the requirements that the parties submit to the licensing procedure. This result was also obtained in Semke.20
We have stated that we adhere to the rule that to raise the constitutionality of a particular provision of a statute the complainant must be directly affected by the provision attacked.21 We have also stated that one adversely affected by a statute challenged as invalid on its face need not violate the law in order to obtain a declaration of its validity or invalidity.22 Appellant here is clearly affected by the challenged provisions in that they require it to submit to certain procedures to engage in the normal course of its business. Appellant contends that the legislation requiring it to submit to these procedures is facially invalid. It is not necessary that appellant attempt to establish a new dealership without going through these procedures and thus risk a termination of the license permitting it to do business in this state in order to obtain a ruling on the validity of the legislation.
*113The trial court in this case erred in finding, as a matter of law, that appellant’s second amended petition failed to present a justiciable controversy within the meaning of 12 O.S.1981 § 1651. The trial court’s ruling is REVERSED and the cause REMANDED for further proceedings.
DOOLIN, C.J., HARGRAVE, V.C.J., and HODGES, SIMMS, ALMA WILSON and SUMMERS, JJ., concur. OPALA, J., concurs in result. KAUGER, J., disqualified..12 O.S.1981 § 1651, provides:
District courts may, in cases of actual controversy, determine rights, status, or other legal relations, including but not limited to a determination of the construction or validity of any foreign judgment or decree, deed, contract, trust, or other instrument or agreement or of any statute, municipal ordinance, or other governmental regulation, whether or not other relief is or could be claimed, except that no such declaration shall be made concerning liability or nonliability for damages on account of alleged tortious injuries to persons or to property either before or after judgment or for compensation alleged to be due under workers’ compensation laws for injuries to persons or concerning obligations alleged to arise under policies of insurance covering liability or indemnity against liability for such injuries. The determination may be made either before or after there has been a breach of any legal duty or obligation, and it may be either affirmative or negative in form and effect; provided however, that a court may refuse to make such determination where the judgment, if rendered, would not terminate the controversy, or some part thereof, giving rise to the proceeding.
. 391 P.2d 242 (Okla.1964).
. 391 P.2d at 244, citing Kress v. Corey, 65 Nev. 1, 189 P.2d 352 (1948).
. The statutes addressed by these allegations of the petition are 47 O.S.1981, §§ 578 through 580.1, which provide for the notice and hearing, set standards for consideration of good cause to prevent establishment of a new dealership, establish sanctions for failure to comply and provide for review of OMVC determination.
. Specifically 47 O.S.1981 § 580.1.
. OKLA.CONST. Art. II, § 32 and Art. V, § 44.
. 47 O.S.1981 § 563, and §§ 578 through 580.1.
. Nutt v. Carson, 340 P.2d 260 (Okla.1959).
. See Gordon v. Followell, 391 P.2d at 244.
. See 47 O.S.1981 § 561.
. 184 Okla. 236, 87 P.2d 136 (1939).
. 465 P.2d 441 (Okla.1970).
. 490 P.2d 246 (Okla.1971).
. In Semke, the challenge was to the requirement that an applicant for a new car dealer’s license have a new car franchise. In Bradbury, the challenge was to the requirement that an applicant for renewal of a chiropodist’s license be a member in good standing of certain state and national organizations.
. See 490 P.2d at 248; 465 P.2d at 447 (Hodges, J., dissenting).
. Supra, note 11.
. 359 P.2d 717 (Okla.1961).
. In Shinn the challenge was to a set of Oklahoma City ordinances governing the business of money lenders and pawn brokers. In Thrasher, the challenge was to the State Dental Act.
. 359 P.2d at 725.
. Supra, note 12 (see dissenting opinion by Hodges, J.).
. 359 P.2d at 725.
. Oklahoma Tax Comm. v. Smith, 610 P.2d 794, 801 (Okla.1980); State ex rel. Board of Examiners in Optometry v. Lawton, 523 P.2d 1064, 1066 (Okla.1974).