final ViewCalculationConfiguration calcConfig = new ViewCalculationConfiguration(viewDefinition, "Config1");
viewDefinition.addViewCalculationConfiguration(calcConfig);
final ExternalId secIdentifier1 = ExternalId.of("SEC", "1");
final SimpleSecurity sec1 = new SimpleSecurity("My Sec");
sec1.addExternalId(secIdentifier1);
final InMemorySecuritySource securitySource = new InMemorySecuritySource();
securitySource.addSecurity(sec1);
final UniqueId t1 = UniqueId.of("TestScheme", "t1");
final InMemoryFunctionRepository functionRepo = new InMemoryFunctionRepository();
final MockFunction f1 = MockFunction.getMockFunction("f1", new ComputationTarget(ComputationTargetType.PRIMITIVE, t1), 42);
final MockFunction f2 = MockFunction.getMockFunction("f2", new ComputationTarget(ComputationTargetType.SECURITY, sec1), 60, f1);
functionRepo.addFunction(f1);