@Before
    public void setUp() {
        // Extract applications and hosts from dummy instance lookup service
        Iterator<ApplicationInstance> iterator = DummyServiceMonitor.getApplications().iterator();
        ApplicationInstanceReference app1_ref = iterator.next().reference();
        app1 = OrchestratorUtil.toApplicationId(app1_ref);
        app1_host1 = DummyServiceMonitor.getContentHosts(app1_ref).iterator().next();
        app2 = OrchestratorUtil.toApplicationId(iterator.next().reference());

        clustercontroller = new ClusterControllerClientFactoryMock();
        orchestrator = new OrchestratorImpl(new HostedVespaPolicy(new HostedVespaClusterPolicy(flagSource, zone),
                                                                  clustercontroller,
                                                                  applicationApiFactory,
                                                                  flagSource),
                                            clustercontroller,
                                            statusService,
                                            new DummyServiceMonitor(),
                                            0,
                                            new ManualClock(),
                                            applicationApiFactory,
                                            flagSource);

        clustercontroller.setAllDummyNodesAsUp();
    }
Test Orchestrator with a mock backend (the MockCurator)

@author smorgrav
orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorImplTest.java