@Override
    public void start() {
        if (reporter != null) {
            LOG.debug("Starting...");
            reporter.start(reportingIntervalSecs, TimeUnit.SECONDS);
        } else {
            throw new IllegalStateException("Attempt to start without preparing " + getClass().getSimpleName());
        }
    }
@Test
    public void testBasicAuth() throws IOException {
        pushGatewayContainer
                .withCopyFileToContainer(MountableFile.forClasspathResource("/pushgateway-basicauth.yaml"), "/pushgateway/pushgateway-basicauth.yaml")
                .withCommand("--web.config.file", "pushgateway-basicauth.yaml")
                .start();

        final PrometheusPreparableReporter sut = new PrometheusPreparableReporter();

        final Map<String, Object> daemonConf = Map.of(
                "storm.daemon.metrics.reporter.plugin.prometheus.job", "test_simple",
                "storm.daemon.metrics.reporter.plugin.prometheus.endpoint", "localhost:" + pushGatewayContainer.getMappedPort(9091),
                "storm.daemon.metrics.reporter.plugin.prometheus.scheme", "http",
                "storm.daemon.metrics.reporter.plugin.prometheus.basic_auth_user", "my_user",
                "storm.daemon.metrics.reporter.plugin.prometheus.basic_auth_password", "secret_password"
        );

        runTest(sut, daemonConf);
    }