Adding Unit Tests for XmlFormatters with DeclaredType as object.

Issue #1072 
`Assert.Equal(expectedOutput, Assert.Single(result).RawValue);`

much clearer and validates something else that you care about