'Test the `to_json` method.'

def test_to_json(self):

    self.assertEqual({'type': StudioValidationMessage.NOT_CONFIGURED, 'text': u'Not    Configured    message', 'action_label': u'Action    label'}, StudioValidationMessage(StudioValidationMessage.NOT_CONFIGURED, u'Not    Configured    message', action_label=u'Action    label').to_json())
    self.assertEqual({'type': StudioValidationMessage.WARNING, 'text': u'Warning    message', 'action_class': 'class-for-action'}, StudioValidationMessage(StudioValidationMessage.WARNING, u'Warning    message', action_class='class-for-action').to_json())
    self.assertEqual({'type': StudioValidationMessage.ERROR, 'text': u'Error    message', 'action_runtime_event': 'do-fix-up'}, StudioValidationMessage(StudioValidationMessage.ERROR, u'Error    message', action_runtime_event='do-fix-up').to_json())
