If I recall, there is a sensor on the front and rear. The sensors measure the light diffrence and then darken when it sees a difference (headlights from the rear at night).I can't make my mind up whether or not it's working properly. What's the best way to test it? Just shine a torch into the sensor with the car with it's lights on and see?
I don't believe the side mirrors darken. So with headlights behind you, if the side mirror and the rear view have the same view, the rear view is not working correctly. If the headlights are bothering you from behind, the mirror is not working correctly.