Your post is confusing. I take it the car failed an emission test. Disconnecting the battery three years ago is unlikely to have anything to do with failing emissions as long as there is no check engine light showing and no error codes.
What kind of test do you have - two speed no load or a loaded dynamometer test? What are the emission test numbers and passing limits for all three pollutants and 02 and CO2, if listed.
Prior to emission testing the car should be thoroughly warmed up by at least 15 minutes of in town driving, and preferably at least five minutes of freeway driving. Mercs are subject to emission test failures because the converters tend to run cool at idle. You should never just drop the car off for emission testing. Go to an establishment where they do the test while you wait. Do not shut off the engine while waiting, and if you have to wait more than five minutes before your car is testing, either come back another time of keep the engine revs at 2000 while you wait.
Give us a more thorough rundown of how you are going about having the car tested, the actual emission test procedure and results, and we might be able to do some reasonably diagnosis.