}
}
assertTrue( results.getMessages().isEmpty() );
final KieModuleMetaData metaData = KieModuleMetaData.Factory.newKieModuleMetaData( builder.getKieModule() );
//Check packages
final Set<String> packageNames = new HashSet<String>();
final Iterator<String> packageNameIterator = metaData.getPackages().iterator();
while ( packageNameIterator.hasNext() ) {
packageNames.add( packageNameIterator.next() );
}
assertEquals( 2,
packageNames.size() );
assertTrue( packageNames.contains( "defaultpkg" ) );
assertTrue( packageNames.contains( "org.kie.workbench.common.services.builder.tests.test1" ) );
//Check classes
final String packageName = "org.kie.workbench.common.services.builder.tests.test1";
assertEquals( 1,
metaData.getClasses( packageName ).size() );
final String className = metaData.getClasses( packageName ).iterator().next();
assertEquals( "Bean",
className );
//Check metadata
final Class clazz = metaData.getClass( packageName,
className );
final TypeMetaInfo typeMetaInfo = metaData.getTypeMetaInfo( clazz );
assertNotNull( typeMetaInfo );
assertFalse( typeMetaInfo.isEvent() );
}