@Test
    public void testBootstrapNonHostedOneConfigModel() throws Exception {
        ConfigserverConfig configserverConfig = createConfigserverConfigNonHosted(temporaryFolder);
        String vespaVersion = "1.2.3";
        List<Host> hosts = createHosts(vespaVersion);
        Curator curator = new MockCurator();
        DeployTester tester = new DeployTester.Builder(temporaryFolder)
                .modelFactory(DeployTester.createModelFactory(Version.fromString(vespaVersion)))
                .hostProvisioner(new InMemoryProvisioner(new Hosts(hosts), true, false))
                .configserverConfig(configserverConfig)
                .zone(new Zone(Environment.dev, RegionName.defaultName()))
                .curator(curator)
                .build();
        tester.deployApp("src/test/apps/app/", vespaVersion);
        ApplicationId applicationId = tester.applicationId();

        // Ugly hack, but I see no other way of doing it:
        // Manipulate application version in zookeeper so that it is an older version than the model we know, which is
        // the case when upgrading on non-hosted installations
        curator.set(Path.fromString("/config/v2/tenants/" + applicationId.tenant().value() + "/sessions/2/version"), Utf8.toBytes("1.2.2"));

        RpcServer rpcServer = createRpcServer(configserverConfig);
        Bootstrapper bootstrap = createBootstrapper(tester, rpcServer, VIP_STATUS_PROGRAMMATICALLY);
        assertTrue(bootstrap.isUpgraded());
        bootstrap.doStart();
        waitUntil(rpcServer::isRunning, "failed waiting for Rpc server running");
        assertTrue(rpcServer.isServingConfigRequests());
        waitUntil(() -> bootstrap.status() == StateMonitor.Status.up, "failed waiting for status 'up'");
        waitUntil(() -> bootstrap.vipStatus().isInRotation(), "failed waiting for server to be in rotation");
    }
@author Ulf Lilleengen
@author Harald Musum
configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java