The transponder needs to be tested every 24 months.
Unless it has been inspected and found to be in working order within the preceding 24 calendar months, no one may use ATC transponder. The inspection requirements are outlined in 14 CFR Appendix F.
14 CFR Appendix F to Part 43, ATC Transponder Tests and Inspections
14 CFR 91.413 Transponder test