@Test
public void testTypeDeclaration() throws Exception {
PackageDescr pkgDescr = new PackageDescr( "org.drools.compiler" );
TypeDeclarationDescr typeDescr = new TypeDeclarationDescr( "StockTick" );
typeDescr.addAnnotation( Role.class.getCanonicalName(), "Event" );
typeDescr.addAnnotation( TypeSafe.class.getCanonicalName(), "true" );
pkgDescr.addTypeDeclaration( typeDescr );
KnowledgeBuilderImpl builder = new KnowledgeBuilderImpl();
builder.addPackage( pkgDescr );
if ( builder.hasErrors() ) {