private boolean isInMaintenance(ApplicationId appId, HostName hostName) throws ApplicationIdNotFoundException {
        for (ApplicationInstance app : DummyServiceMonitor.getApplications()) {
            if (app.reference().equals(OrchestratorUtil.toApplicationInstanceReference(appId, new DummyServiceMonitor()))) {
                return clustercontroller.isInMaintenance(app, hostName);
            }
        }
        throw new ApplicationIdNotFoundException();
    }
Test Orchestrator with a mock backend (the MockCurator)

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