New Jersey Transit is seeking a declaratory judgment finding that a critic of the agency’s management who was fired is not entitled to protection under the state whistleblower law.

The agency filed suit Thursday against Todd Barretta, who was hired in February for the newly created post of chief compliance officer. Barretta was fired on Aug. 21, and four days later, he testified before a legislative committee that New Jersey Transit is mismanaged and beset by patronage.