public void TestComplexObject() { var obj = new ComplexObject(); var doc = obj.ToMutableDocument(); ComplexObject newObject = (ComplexObject)doc.ToObject(); Assert.True(newObject.Foo is B); }