That happened at Rackspace a few years back: http://techcrunch.com/2009/06/30/what-went-down-at-rackspace...
I have an account with GoGrid, and they do a regular testing of their backup generators. I'm not sure if they throw the switch on the mains, though.