assertEquals( "org.drools.compiler.test.NewBean",
type.getTypeClass().getName() );
assertFalse( builder.hasErrors() );
Package bp = builder.getPackage();
CompositeClassLoader rootClassloader = ClassLoaderUtil.getClassLoader( new ClassLoader[]{Thread.currentThread().getContextClassLoader()},
getClass(),
false );
JavaDialectRuntimeData dialectData = (JavaDialectRuntimeData) bp.getDialectRuntimeRegistry().getDialectData( "java" );
dialectData.onAdd( bp.getDialectRuntimeRegistry(),
rootClassloader );
Class newBean = rootClassloader.loadClass( "org.drools.compiler.test.NewBean" );
assertNotNull( newBean );
}