@Test
    void requireThatRequestsPerConnectionMetricIsAggregated() throws IOException {
        Path privateKeyFile = File.createTempFile("junit", null, tmpFolder).toPath();
        Path certificateFile = File.createTempFile("junit", null, tmpFolder).toPath();
        generatePrivateKeyAndCertificate(privateKeyFile, certificateFile);
        var metricConsumer = new MetricConsumerMock();
        InMemoryConnectionLog connectionLog = new InMemoryConnectionLog();
        JettyTestDriver driver = createSslTestDriver(certificateFile, privateKeyFile, metricConsumer, connectionLog);
        driver.client().get("/").expectStatusCode(is(OK));
        assertTrue(driver.close());
        verify(metricConsumer.mockitoMock(), atLeast(1))
                .set(MetricDefinitions.REQUESTS_PER_CONNECTION, 1L, MetricConsumerMock.STATIC_CONTEXT);
    }
@author Oyvind Bakksjo
@author Simon Thoresen Hult
@author bjorncs
container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java