public static NodeFailTester withTwoApplications(int hostCount, int containerCount, int contentCount) {
        NodeFailTester tester = new NodeFailTester();
        tester.tester.makeReadyHosts(hostCount, new NodeResources(2, 8, 20, 10));

        // Create tenant host application
        Version version = Version.fromString("6.75.0");
        TenantHostApplication tenantHostApp = new TenantHostApplication();
        ClusterSpec clusterApp1 = ClusterSpec.request(ClusterSpec.Type.container, testCluster).vespaVersion(version).build();
        ClusterSpec clusterApp2 = ClusterSpec.request(ClusterSpec.Type.content, testCluster).vespaVersion(version).build();
        Capacity capacity1 = Capacity.from(new ClusterResources(containerCount, 1, new NodeResources(1, 4, 10, 0.3)), false, true);
        Capacity capacity2 = Capacity.from(new ClusterResources(contentCount, 1, new NodeResources(1, 4, 10, 0.3)), false, true);
        tester.tester.prepareAndActivateInfraApplication(tenantHostApp, version);
        tester.activate(app1, clusterApp1, capacity1);
        tester.activate(app2, clusterApp2, capacity2);
        assertEquals(Set.of(tester.nodeRepository.nodes().list().nodeType(NodeType.host).asList()),
                     Set.of(tester.nodeRepository.nodes().list(Node.State.active).owner(tenantHostApp.getApplicationId()).asList()));
        assertEquals(capacity1.minResources().nodes(), tester.nodeRepository.nodes().list(Node.State.active).owner(app1).size());
        assertEquals(capacity2.minResources().nodes(), tester.nodeRepository.nodes().list(Node.State.active).owner(app2).size());

        List<MockDeployer.ApplicationContext> apps = List.of(
                new MockDeployer.ApplicationContext(tenantHostApp, version),
                new MockDeployer.ApplicationContext(app1, clusterApp1, capacity1),
                new MockDeployer.ApplicationContext(app2, clusterApp2, capacity2));
        tester.initializeMaintainers(apps);
        return tester;
    }
Create hostCount hosts, one app with containerCount containers, and one app with contentCount content nodes.
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailTester.java