@Test
    public void test_scaling_down_leaves_too_little_headroom() {
        var r = new NodeResources(16, 32, 100, 1, NodeResources.DiskSpeed.any);
        var min = new ClusterResources( 3, 3, r);
        var now = new ClusterResources( 4, 4, r);
        var max = new ClusterResources( 5, 5, r);
        var fixture = DynamicProvisioningTester.fixture()
                                               .awsProdSetup(false)
                                               .capacity(Capacity.from(min, max, IntRange.from(1)))
                                               .clusterType(ClusterSpec.Type.content)
                                               .initialResources(Optional.of(now))
                                               .build();
        fixture.loader().applyCpuLoad(0.17, 10);
        assertTrue("Not scaling down as that would leave just 4.5% headroom before needing to scale up again",
                   fixture.autoscale().resources().isEmpty());
    }
Same setup as test_autoscaling_in_dev(), just with required = true
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java