_cacheManager);
functionCompilationContext.setRawComputationTargetResolver(computationTargetResolver);
final ViewCompilationServices vcs = new ViewCompilationServices(new FixedMarketDataAvailabilityProvider(), functionResolver, functionCompilationContext, new PoolExecutor(1, getClass()
.getSimpleName()),
new DependencyGraphBuilderFactory());
final ViewDefinition viewDefinition = new ViewDefinition("My View", UniqueId.of("FOO", "BAR"), "kirk");
// We've not provided a function that targets the position level, so we can't ask for it.
viewDefinition.getResultModelDefinition().setPositionOutputMode(ResultOutputMode.NONE);
final ViewCalculationConfiguration calcConfig = new ViewCalculationConfiguration(viewDefinition, "Fibble");
calcConfig.addPortfolioRequirementName("My Sec", "OUTPUT");
viewDefinition.addViewCalculationConfiguration(calcConfig);
final CompiledViewDefinitionWithGraphsImpl compiledViewDefinition = ViewDefinitionCompiler.compile(viewDefinition, vcs, Instant.now(), VersionCorrection.LATEST);
assertTrue(compiledViewDefinition.getMarketDataRequirements().isEmpty());
assertEquals(1, compiledViewDefinition.getDependencyGraphExplorers().size());
assertNotNull(compiledViewDefinition.getDependencyGraphExplorer("Fibble"));
assertTargets(compiledViewDefinition, pn.getUniqueId());