@Test
    public void test_autoscaling_metrics() {
        var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();

        // Empty has metrics at zero
        assertEquals(new Autoscaling.Metrics(0, 0, 0),
                     fixture.autoscale().metrics());


        // No external load mesurements -> 0
        fixture.tester().clock().advance(Duration.ofDays(2));
        fixture.loader().addCpuMeasurements(0.7f, 10);
        assertEquals(new Autoscaling.Metrics(0, 1.0, 0),
                     fixture.autoscale().metrics());

        // External load is measured to zero -> 0
        fixture.tester().clock().advance(Duration.ofDays(2));
        var duration = fixture.loader().addCpuMeasurements(0.7f, 10);
        fixture.tester().clock().advance(duration.negated());
        fixture.loader().addQueryRateMeasurements(10, i -> 0.0);
        assertEquals(new Autoscaling.Metrics(0, 1.0, 0),
                     fixture.autoscale().metrics());

        // External load
        fixture.tester().clock().advance(Duration.ofDays(2));
        duration = fixture.loader().addCpuMeasurements(0.7f, 10);
        fixture.tester().clock().advance(duration.negated());
        fixture.loader().addQueryRateMeasurements(10, i -> 110.0);
        assertEquals(new Autoscaling.Metrics(110, 1.0, 0.05),
                     round(fixture.autoscale().metrics()));
    }
Tests with varying BCP group info parameters.
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingUsingBcpGroupInfoTest.java