@Test(expected = NodeAllocationException.class)
    public void fail_when_too_few_distinct_parent_hosts() {
        ProvisioningTester tester = new ProvisioningTester.Builder().build();
        tester.makeReadyChildren(2, resources1, "parentHost1");
        tester.makeReadyChildren(1, resources1, "parentHost2");

        int contentNodeCount = 3;
        List<HostSpec> hosts = tester.prepare(applicationId, contentClusterSpec, contentNodeCount, 1, resources1);
        tester.activate(applicationId, hosts);

        NodeList nodes = tester.getNodes(applicationId, Node.State.active);
        assertDistinctParentHosts(nodes, ClusterSpec.Type.content, contentNodeCount);
    }
Tests provisioning of virtual nodes

@author hmusum
@author mpolden
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/VirtualNodeProvisioningTest.java