def METHOD_NAME(self):
    """
    Test that the template can be loaded with `setup --index-management`
    """
    es = self.get_elasticsearch_instance()
    self.render_config_template(
        monitors=[{
            "type": "http",
            "urls": ["http://localhost:9200"],
        }],
        elasticsearch=self.get_elasticsearch_template_config()
    )
    exit_code = self.run_beat(extra_args=["setup", "--index-management"])
    assert exit_code == 0
    assert self.log_contains('Loaded index template')
    assert len(es.cat.templates(name='heartbeat-*', h='name')) > 0