Energy2D: Add automated test of serialization after changes

[#52940627]