Added test for serialization via reflection and got it working.