Two men who said they worked for a company hired by the state to test the security of a courthouse in central Iowa were arrested after they broke in to the county building last week as part of what they say was their work, according to court documents.

On Friday, they will appear in the same building, but this time to face felony charges.

The two men, Justin L. Wynn, of Naples, Fla., 29, and Gary Demercurio, 43, of Bothell, Wa., are scheduled to appear then in the District Court of Iowa in Adel. They will each face charges of third-degree burglary, a felony, and possession of burglary tools, an aggravated misdemeanor, Chuck C. Sinnard, the Dallas County Iowa attorney, said on Monday.

Iowa’s State Court Administration, which oversees the functioning of the state’s judicial branches, said in a statement on Wednesday that it had hired a company “to test the security of the court’s electronic records.”

“The company was asked to attempt unauthorized access to court records through various means to learn of any potential vulnerabilities,” the statement said. It said that a “penetration test is one of many measures used to ensure electronic court documents are secure.”