@Override
    public void configure(Map<String, ?> configs) {
        super.configure(configs);
        configureSamplingInterval(configs);
        configurePrometheusAdapter(configs);
        configureQueryMap(configs);
    }
@Test(expected = SamplingException.class)
    public void testGetSamplesQueryThrowsException() throws Exception {
        Map<String, Object> config = new HashMap<>();
        config.put(PROMETHEUS_SERVER_ENDPOINT_CONFIG, "http://kafka-cluster-1.org:9090");
        addCapacityConfig(config);
        _prometheusMetricSampler.configure(config);

        MetricSamplerOptions metricSamplerOptions = buildMetricSamplerOptions(TEST_TOPIC);
        _prometheusMetricSampler._prometheusAdapter = _prometheusAdapter;
        expect(_prometheusAdapter.queryMetric(anyString(), anyLong(), anyLong()))
            .andThrow(new IOException("Exception in fetching metrics"));

        replay(_prometheusAdapter);
        try {
            _prometheusMetricSampler.getSamples(metricSamplerOptions);
        } finally {
            verify(_prometheusAdapter);
        }
    }