Tests for exception serialization