AnnotationConfiguration config = new AnnotationConfiguration();
config.addAnnotatedClass( Customer.class );
config.addAnnotatedClass( Order.class );
config.addAnnotatedClass( SupportTickets.class );
config.addAnnotatedClass( Country.class );
config.addPackage( Customer.class.getPackage().getName() );
SessionFactoryImplementor sessionImpl = ( SessionFactoryImplementor ) config.buildSessionFactory();
assertTrue(
"fetch profile not parsed properly",
sessionImpl.containsFetchProfileDefinition( "package-profile-1" )