If your mechanic has not checked the electronic perimeters of your O2 sensors with a scan tool I suggest you may have them looked at. If your car fails an emissions test, your failing 525i oxygen sensor may be to blame. When your BMW 525i oxygen sensor is on the way out, it may work sporadically rather than quit altogether, which means a diagnostics test is not a foolproof method. I suggest checking into your O2 sensors operation your answer may be a replacement.
Sounds like you need a new mechanic. If the car did not pass the emissions inspection, there must be a solution to making it pass. Running the car again and again is not going to wish the car to pass. A tech needs to read the results and determine how to reduce the emissions safely to adhere to the limits of your state. If you do not already have the test results, ask the mechanic to give the results to you. Take it to another shop to be evaluated.
〉 Answered on Nov 29th, 2010 by Audra Fordin, Owner at Great Bear Auto Shop