Adding Unit Tests for XmlFormatters with DeclaredType as object.

Issue #1072 
We should test `CanWriteResult` as well as `WriteAsync`