assertEquals( 200, poolOne.getMaximumInstances() );
}
@Test
public void testSharedPoolWithFactory() throws Exception {
MockDeploymentPhaseContext phaseContext = createPhaseContext();
MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();
PoolMetaData poolMetaData = new PoolMetaData( "pool_one" );
poolMetaData.setInstanceFactoryName( "instance_factory" );
poolMetaData.setShared();
unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, poolMetaData );
RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "test-app");
rubyAppMetaData.attachTo( unit );
deploy( phaseContext );
ServiceName poolServiceName = CoreServices.runtimePoolName( unit, "pool_one" );
MockServiceBuilder<?> poolServiceBuilder = phaseContext.getMockServiceTarget().getMockServiceBuilder( poolServiceName );
Value<?> poolServiceValue = poolServiceBuilder.getValue();
RestartableRubyRuntimePool poolOne = (RestartableRubyRuntimePool) poolServiceValue.getValue();
assertNotNull( poolOne );
assertEquals( "pool_one", poolOne.getName() );