}
public void testExtensions()
throws Exception
{
final LoaderBuilder builder = new LoaderBuilder();
final ClassLoaderMetaData classLoader =
new ClassLoaderMetaData( "ext",
"*system*",
new String[ 0 ],
new Extension[]{DataConstants.EXTENSION},
new FileSetMetaData[ 0 ] );
final ClassLoaderSetMetaData metadata =
new ClassLoaderSetMetaData( "ext",
new String[]{"*system*"},
new ClassLoaderMetaData[]{classLoader},
new JoinMetaData[ 0 ] );
final SimpleLoaderResolver resolver = new TestLoaderResolver( new File( "." ) );
final HashMap predefined = new HashMap();
predefined.put( "*system*", ClassLoader.getSystemClassLoader() );
try
{
builder.buildClassLoaders( metadata, resolver, predefined );
}
catch( Exception e )
{
fail( "Unexpected failure to build classloaders with extension: " + e );
}