def METHOD_NAME(aggregator, poll_mock):
    """
    Testing prometheus with default instance
    """
    c = PrometheusCheck(
        CHECK_NAME,
        None,
        {},
        [],
        default_instances={
            'foobar': {
                'prometheus_url': 'http://localhost:10249/metrics',
                'namespace': 'foobar',
                'metrics': ['metric3', 'metric4'],
            },
            'prometheus': {
                'prometheus_url': 'http://localhost:10249/metrics',
                'namespace': 'prometheus',
                'metrics': ['metric2'],
                'label_joins': {'metric2': {'label_to_match': 'matched_label', 'labels_to_get': ['timestamp']}},
                'tags': ['extra:bar'],
            },
        },
        default_namespace='prometheus',
    )
    # run the check twice for label joins
    for _ in range(2):
        c.check(
            {
                'prometheus_url': 'http://custom:1337/metrics',
                'namespace': 'prometheus',
                'metrics': [{'metric1': 'renamed.metric1'}],
                'label_joins': {'renamed.metric1': {'label_to_match': 'matched_label', 'labels_to_get': ['flavor']}},
                'label_to_hostname': 'node',
                'tags': ['extra:foo'],
            }
        )
    aggregator.assert_metric(
        CHECK_NAME + '.renamed.metric1',
        hostname="host1",
        tags=['node:host1', 'flavor:test', 'matched_label:foobar', 'timestamp:123', 'extra:foo'],
        metric_type=aggregator.GAUGE,
    )
    aggregator.assert_metric(
        CHECK_NAME + '.metric2',
        hostname="host2",
        tags=['timestamp:123', 'node:host2', 'matched_label:foobar', 'timestamp:123', 'extra:foo'],
        metric_type=aggregator.GAUGE,
    )
    assert aggregator.metrics_asserted_pct == 100.0