My 89 260E failed the NYS test -- until the well-informed tech at the Mobil station remembered that this particular car has to be hot, and he let it run awhile before repeating the test -- and it passed.
You might also have your injector seals checked. My mechanic did this by spraying some sort of (carb?) fluid around each injector with the emissions probe up the car's as-- er, tailpipe
. On one or two of them, the CO/NOx values shot up, indicating the fluid was being draw in and burned, causing the increase in CO/NOx, and indicating a leaky seal. This can apparently confuse the car's computer into thinking it's running lean, causing it to inject more fuel and produce higher emissions.
The only other occasion that happened when when my O2 sensor had failed. After a new sensor was installed, all was fine.
Worst case: Have your mechanic adjust your fuel/air mixture until you are running very lean. You will pass. (Trust me.