SerializationRoundTripTest
Tests that generated types correctly serialize and deserialize JSON.
Layer E: Structural JSON Round-Trip Tests.
These tests verify that generated types can:
Parse fixture JSON into generated types, then re-serialize back.
Construct instances programmatically, serialize, then parse back.
JSON structures are compared using parsed JsonElement trees (not textual key ordering) to verify structural equality.
Gson is used for the actual serialization because it does not require a compiler plugin. The generated source code is compiled at test time via the embedded K2JVMCompiler.
For kotlinx.serialization-specific features (like polymorphic interface discrimination via __typename), source-level annotation verification is used since the kotlinx compiler plugin is not available at test time.