return new EHCacheViewExecutionCache(_cacheManager, configSource, functions);
}
public void testCompiledViewDefinitionWithGraphs_serialization() throws Exception {
final EHCacheViewExecutionCache cache = createCache();
final CompiledViewDefinitionWithGraphs object = createCompiledViewDefinitionWithGraphs();
final CompiledViewDefinitionWithGraphsHolder holder = cache.new CompiledViewDefinitionWithGraphsHolder(object);
assertSame(holder.get(), object);
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(holder);
final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
final ObjectInputStream ois = new ObjectInputStream(bais);
final Object newHolder = ois.readObject();
assertEquals(newHolder.getClass(), CompiledViewDefinitionWithGraphsHolder.class);
final CompiledViewDefinitionWithGraphs newObject = ((CompiledViewDefinitionWithGraphsHolder) newHolder).get();
assertEquals(newObject.getCompiledCalculationConfigurations(), object.getCompiledCalculationConfigurations());
assertEquals(newObject.getComputationTargets(), object.getComputationTargets());
assertEquals(newObject.getMarketDataRequirements(), object.getMarketDataRequirements());
assertEquals(newObject.getPortfolio(), object.getPortfolio());
assertEquals(newObject.getResolvedIdentifiers(), object.getResolvedIdentifiers());
assertEquals(newObject.getResolverVersionCorrection(), object.getResolverVersionCorrection());
}