Introducing UnitTests for XmlFormatters to confirm that headers are always written before writing the body.

Issue https://github.com/aspnet/Mvc/issues/607.
Instead if you want to test, i would say a better approach would be to add a functional test which sets the header after the write and you make sure that the header does not make it back. 
( As i write this, i am thinking even then it would be a hosting/abstractions feature test rather than something we should be concerned about in mvc.).