def METHOD_NAME(self, expected, local=None, top=None):
    monitor = {
        "type": "http",
        "urls": ["http://localhost:9200"],
    }
    if local:
        monitor.update(local)
    config = {
        "monitors": [monitor]
    }
    if top:
        config.update(top)
    self.render_config_template(
        path=os.path.abspath(self.working_dir) + "/*",
        **config
    )
    heartbeat_proc = self.start_beat()
    self.wait_until(lambda: self.output_lines() > 0)
    heartbeat_proc.check_kill_and_wait()
    doc = self.read_output()[0]
    assert expected.items() <= doc.items()
    return doc