Take your car for a drive of at least HALF HOUR immediately before the test and try to keep the RPM between 3 and 4 thousand during the drive (keep it on 3rd gear for that). Also try to floor the gas as often as you can (dont brake the speed limits just try to find an uphill and floor it). The idea is to keep the catalyst HOT. Then take it back for the test and let it idle all the time before the test so it will stay warm. You will be surprised to find out that you will pass.
My car failed both HC and NOX and the test guy told me to do as above and bring it back. I did and it passed with flying colors, the measurements were actually cut IN HALF of the previous ones. HUGE difference. These cars need to be warmed up good to pass.