@Test
    public void change_not_requiring_node_replacement_is_preferred() {
        var min = new ClusterResources(5, 1, new NodeResources(  16, 64, 200, 1, DiskSpeed.fast, StorageType.remote));
        var max = new ClusterResources(6, 1, new NodeResources(  16, 64, 200, 1, DiskSpeed.fast, StorageType.remote));

        List<Flavor> flavors = List.of(new Flavor("arm_16", new NodeResources(  16, 64, 200, 1, DiskSpeed.fast, StorageType.remote, NodeResources.Architecture.arm64)),
                                       new Flavor("x86_16", new NodeResources(  16, 64, 200, 1, DiskSpeed.fast, StorageType.remote, NodeResources.Architecture.x86_64)));
        var fixture = DynamicProvisioningTester.fixture()
                                               .clusterType(ClusterSpec.Type.container)
                                               .hostFlavors(flavors)
                                               .awsZone(false, Environment.prod)
                                               .capacity(Capacity.from(min, max))
                                               .initialResources(Optional.of(min.with(min.nodeResources().with(NodeResources.Architecture.x86_64))))
                                               .build();
        var nodes = fixture.nodes().not().retired().asList();
        assertEquals(5, nodes.size());
        assertEquals(NodeResources.Architecture.x86_64, nodes.get(0).resources().architecture());

        fixture.tester().clock().advance(Duration.ofHours(5));
        fixture.loader().applyCpuLoad(0.27, 10); // trigger rescaling, but don't cause fulfilment < 1
        var autoscaling = fixture.autoscale();
        fixture.deploy(Capacity.from(autoscaling.resources().get()));
        nodes = fixture.nodes().not().retired().asList();
        assertEquals(6, nodes.size());
        assertEquals("We stay with x86 even though the first matching flavor is arm",
                     NodeResources.Architecture.x86_64, nodes.get(0).resources().architecture());
    }
Tests an autoscaling scenario which should cause in-place resize.
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java