'Duplicate emails (same message_id) are not processed'

@mute_logger('odoo.addons.mail.models.mail_thread', 'odoo.models')
def test_message_process_duplicate(self):

    self.alias.write({'alias_force_thread_id': self.group_public.id})
    frog_groups = self.format_and_process(MAIL_TEMPLATE, email_from='valid.other@gmail.com', subject='Re:    super    cats', msg_id='<1198923581.41972151344608186799.JavaMail.diff1@agrolait.com>')
    frog_groups = self.format_and_process(MAIL_TEMPLATE, email_from='other4@gmail.com', subject='Re:    news', msg_id='<1198923581.41972151344608186799.JavaMail.diff1@agrolait.com>', extra='In-Reply-To:    <1198923581.41972151344608186799.JavaMail.diff1@agrolait.com>\n')
    self.assertEqual(len(frog_groups), 0, 'message_process:    reply    on    Frogs    should    not    have    created    a    new    group    with    new    subject')
    self.assertEqual(len(self.group_public.message_ids), 2, 'message_process:    message    with    already    existing    message_id    should    not    have    been    duplicated')
    no_of_msg = self.env['mail.message'].search_count([('message_id', 'ilike', '<1198923581.41972151344608186799.JavaMail.diff1@agrolait.com>')])
    self.assertEqual(no_of_msg, 1, 'message_process:    message    with    already    existing    message_id    should    not    have    been    duplicated')
