Adding Unit Tests for XmlFormatters with DeclaredType as object.

Issue #1072