Mr. Justice Walker delivered the opinion of the Court: This was an information in the nature of a quo warranto, filed by Addison Farrington and a number of other persons, in the Whiteside circuit court, at the May term, 1869, against George A. Whitcomb and others, who were acting as mayor and common council of the town of Morrison, in that county. The information charged that the town is located on a part of section eighteen, in township twenty-one, north of range five, east of the fourth principal meridian, and embraces within its boundaries about one hundred and sixty acres; that the town is and has been for a long time past, incorporated under the laws of this State; that the town had its president and trustees, and had at no. time forfeited or suspended the rights pertaining to it under the laws of its incorporation. That the defendants had for forty days, and more, used, and are still using, without any warrant or charter, the rights, privileges and franchises of the town over the lands therein, together with other lands beyond the boundaries of the town, which are described, and which embrace about one thousand acres, against the will of the owners and inhabitants of such territory; that the defendants are exercising the city government over such territory for the purpose of levying taxes, passing ordinances, expending money and obtaining credit in the name of the city government, and the people and the property beyond the limits of the town. That the city proper embraces but one-sixth of the territory over which defendants are exercising and claiming the right to extend the city government; that the remainder of the territory is agricultural or farming lands, and is occupied and used by the owners thereof exclusively for such purpose; that there are within the territory twelve improved farms, over which defendants were attempting to set up and establish the city government. The petition contains a prayer that the defendants be required to answer, and show by what authority, warrant and claim they have used and enjoyed the liberties, privileges and franchises of the city.  The defendants filed an answer, setting up, that by an act of the general assembly of the State, approved on the twenty-third of February, 1869, entitled “an act to incorporate the city of Morrison,” which is set out, and confers the powers necessary to a city government, and authorizes the levy and collection of taxes to defray the expenses arising from the administration thereof; that under the provisions of the act they were duly elected, Whitcomb, mayor, and the others members of the common council, and that by virtue of the city charter and such election, they were exercising the. powers of the city government within the limits prescribed by the charter. To this answer relators filed a general demurrer, which, on a hearing, was overruled, and judgment for costs rendered against them. To reverse that judgment, relators bring the record to this court, and assign for error the overruling of the demurrer, and rendering judgment against them for costs. The question sought to be raised by the information in this case, is, whether the city officers can extend the city government beyond the original limits of the town, and can levy taxes and enforce ordinances in the portion of territory annexed by the act of February 23, 1869, and which is used exclusively for agricultural purposes, and whether that act is not unconstitutional and void. The demurrer to the answer of respondents brought the whole record, as well the information as the answer, before the court to determine its sufficiency. The first question presented by the demurrer is, whether the remedy, if any exists, has not been misconceived; whether the question of power to extend the city government over this territory thus annexed can be raised by quo warranto. This writ is generally employed to try the right a person claims to an office, and not to test the legality of his acts. If an officer threatens to exercise power not conferred upon the office, or to exercise the powers of his office in a territory or jurisdiction within which he is not authorized to act, persons feeling themselves aggrieved may usually restrain the act by injunction. The case of the Attorney General v. The Board of Supervisors, 11 Mich. 63, was a bill filed to restrain the county authorities from unlawfully removing a county seat, and an injunction was granted.  But that case does not hold that the act could have been prevented by an information in the nature of a quo warranto. The case of The People v. Maynard, 15 Mich. 463, was such an information, but it questioned the right of the officer to act as treasurer, in a county. He claimed that by the formation of a new county, the residence of the treasurer of the original county being embraced in the new county, the office had become vacant, and that he was appointed treasurer to fill the vacancy. But it was held that the law which purported to create the new county was unconstitutional, and that the office of treasurer had not become vacant, and hence respondent had not been legally-appointed and did not hold the office or any title to it. The proceeding was instituted alone to try the question whether he was an officer, and not whether his official acts should be confined to a particular locality. It is true the solution of the question whether he was legally treasurer depended upon tire validity of the law intended to create the new county. But it does not follow, because the question whether a law is constitutional may arise in determining whether a person is legally in office, that this proceeding may be resorted to for the purpose of determining whether a law is invalid. In this case, there seems to be no question that defendants in error are legally and properly officers of the city, and there can be as little doubt that they may perform all the functions of their offices within the city limits, whatever they may be. If they attempt to pass and enforce ordinances beyond the bounds of the city, or to levy and collect taxes beyond the city limits, such acts would be unauthorized, and might, no doubt, be restrained on a bill properly framed for that purpose. But whether a law which purports to attach this territory to the original corporate limits is or not constitutional, cannot be determined in such a proceeding as this. 