private static ProvisioningTester tester(SystemName systemName, CloudName cloudName, Environment environment, CloudAccount cloudAccount, List<Flavor> flavors) {
        Cloud cloud = Cloud.builder().name(cloudName).dynamicProvisioning(cloudName != CloudName.YAHOO).account(cloudAccount).build();
        NameResolver nameResolver = cloudName == CloudName.YAHOO ? new DnsNameResolver() : new MockNameResolver().mockAnyLookup();
        ProvisioningTester.Builder builder = new ProvisioningTester.Builder()
                .zone(new Zone(cloud, systemName, environment, RegionName.defaultName()))
                .flavors(flavors)
                .nameResolver(nameResolver)
                .spareCount(environment.isProduction() && !cloud.dynamicProvisioning() && !systemName.isCd() ? 1 : 0);
        if (cloud.dynamicProvisioning())
            builder.hostProvisioner(new MockHostProvisioner(flavors, (MockNameResolver) nameResolver, 0));

        return builder.build();
    }
Scenario tester with real node-repository data loaded from ZK snapshot file

How to use:

1. Copy /opt/vespa/conf/configserver-app/node-flavors.xml from config server to /tmp/node-flavors.xml
2. Copy /opt/vespa/var/zookeeper/version-2/snapshot.XXX from config server to /tmp/snapshot
3. Set capacities and specs according to the wanted scenario

@author valerijf
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/RealDataScenarioTest.java