@Test
    public void test_provisioning_of_multiple_groups_after_flavor_migration_and_exiration() {
        ProvisioningTester tester = new ProvisioningTester.Builder().zone(new Zone(Environment.prod, RegionName.from("us-east"))).build();

        ApplicationId application1 = ProvisioningTester.applicationId("app1");

        tester.makeReadyNodes(10, small);
        tester.makeReadyNodes(16, large);

        deploy(application1, 8, 1, small, tester);
        deploy(application1, 8, 1, large, tester);

        // Expire small nodes
        tester.advanceTime(Duration.ofDays(7));
        MockDeployer deployer =
            new MockDeployer(tester.provisioner(),
                             tester.clock(),
                             List.of(new MockDeployer.ApplicationContext(application1, cluster(),
                                                                                          Capacity.from(new ClusterResources(8, 1, large), false, true))));
        new RetiredExpirer(tester.nodeRepository(),
                           deployer,
                           new TestMetric(),
                           Duration.ofDays(30),
                           Duration.ofHours(12)).run();

        assertEquals(8, tester.getNodes(application1, Node.State.inactive).resources(small).size());
        deploy(application1, 8, 8, large, tester);
    }
When increasing the number of groups without changing node count, we need to provison new nodes for
the new groups since although we can remove nodes from existing groups without losing data we
cannot do so without losing coverage.
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/MultigroupProvisioningTest.java