Method to convert a TestStartEvent instance into a JSON map.
TestStartEvent
Map<String, dynamic> toJson() { return { 'type': type, 'test': test.toJson(), }; }