final OverrideOperation operation = compiler.compile(
"if (security.type == \"EQUITY\" && security.name == \"Foo\") x * 0.9; if (security.type == \"EQUITY\") x * 1.1; if (security.cow == 42) x * 0", new DefaultComputationTargetResolver(
securities).atVersionCorrection(VersionCorrection.LATEST));
assertNotNull(operation);
// First rule should match
Object result = operation.apply(new ValueRequirement("Foo", ComputationTargetSpecification.of(_fooEquity)), 42d);
assertEquals (result, 42d * 0.9);
// Second rule should match
result = operation.apply(new ValueRequirement("Foo", ComputationTargetSpecification.of(_barEquity)), 42d);
assertEquals(result, 42d * 1.1);
// Third rule won't match but won't throw an error