}
protected PartitionProfile assembleSar( final String config )
throws Exception
{
final PhoenixProfileBuilder assembler = new PhoenixProfileBuilder();
final URL resource = getClass().getResource( config );
assertNotNull( "Config resource: " + config, resource );
final ConsoleLogger logger = new ConsoleLogger();
final Configuration assembly =
ConfigurationBuilder.build( new InputSource( resource.toExternalForm() ),
ConfigurationBuilder.ASSEMBLY_SCHEMA,
logger );
final Map parameters = new HashMap();
parameters.put( ContainerConstants.ASSEMBLY_NAME, "test" );
parameters.put( ContainerConstants.ASSEMBLY_DESCRIPTOR, assembly );
parameters.put( ContainerConstants.CONFIG_DESCRIPTOR,
new DefaultConfiguration( "config", "", "" ) );
parameters.put( ContainerConstants.ASSEMBLY_CLASSLOADER,
getClass().getClassLoader() );
assembler.enableLogging( logger );
return assembler.buildProfile( parameters );
}