def METHOD_NAME(self, mock_command):
    """Confirm triggering the search index bootstrapping works as expected."""
    user = UserFactory(is_staff=True)
    self.client.login(username=user.username, password="password")
    # Add the necessary permission
    self.add_permission(user, "can_manage_elasticsearch")
    url = "/api/v1.0/bootstrap-elasticsearch/"
    response = self.client.post(url, follow=True)
    self.assertEqual(response.status_code, 200)
    content = json.loads(response.content)
    self.assertEqual(content, {})
    # Check the presence of a confirmation message
    messages = list(get_messages(response.wsgi_request))
    self.assertEqual(len(messages), 1)
    self.assertEqual(
        str(messages[0]), "The search index was successfully bootstrapped"
    )
    mock_command.assert_called_once_with("bootstrap_elasticsearch")