def test_process_event_bad_message_exception(self, thread: Mock) -> None:
        thread.return_value = 'super'
        _queue_processor = QueueProcessor(self._queue_channel,
                                          self._message_sender,
                                          self._message_registrar,
                                          self._queue_pusher)
        self.assertIsNotNone(_queue_processor)
        self._message_sender.send_message.side_effect = BadResponseException(
            'strange')
        self._queue_pusher.put_message_to_queue.return_value = None
        self._message_registrar.store_message.return_value = None

        _queue_processor.process_event({})

        self._message_sender.send_message.assert_not_called()
        self._queue_pusher.put_message_to_queue.assert_not_called()
        self._message_registrar.store_message.assert_called_once_with('\\{\\}')
    def test_process_event_success(self, thread: Mock) -> None:
        thread.return_value = 'super'
        _queue_processor = QueueProcessor(self._queue_channel,
                                          self._message_sender,
                                          self._message_registrar,
                                          self._queue_pusher)
        self.assertIsNotNone(_queue_processor)
        self._message_sender.send_message.return_value = None
        self._queue_pusher.put_message_to_queue.return_value = None
        self._message_registrar.store_message.return_value = None

        _queue_processor.process_event(_predefined_message)

        self._message_sender.send_message.assert_called_once()
        self.assertEqual(
            "Hello", self._message_sender.send_message.call_args[0][0].text)
        self.assertEqual(
            12, self._message_sender.send_message.call_args[0][0].chat_id)
        self._queue_pusher.put_message_to_queue.assert_not_called()
        self._message_registrar.store_message.assert_not_called()
    def test_process_event_bad_response_exception(self, thread: Mock) -> None:
        thread.return_value = 'super'
        _queue_processor = QueueProcessor(self._queue_channel,
                                          self._message_sender,
                                          self._message_registrar,
                                          self._queue_pusher)
        self.assertIsNotNone(_queue_processor)
        self._message_sender.send_message.side_effect = BadResponseException(
            'strange')
        self._queue_pusher.put_message_to_queue.return_value = None
        self._message_registrar.store_message.return_value = None

        _queue_processor.process_event(_predefined_message)

        self._message_sender.send_message.assert_called_once()
        self.assertEqual(
            "Hello", self._message_sender.send_message.call_args[0][0].text)
        self.assertEqual(
            12, self._message_sender.send_message.call_args[0][0].chat_id)
        self._queue_pusher.put_message_to_queue.assert_not_called()
        self._message_registrar.store_message.assert_called_once_with(ANY)