//impl.buildPackage(pkg.getUUID(), true);
pkg.checkin( "version3" );
//Verify the latest version
PackageItem item = impl.getRulesRepository().loadPackage( "testGetHistoryPackageSource" );
ContentPackageAssembler asm = new ContentPackageAssembler( item,
false );
String drl = asm.getDRL();
System.out.println( drl );
assertEquals( "version3",
item.getCheckinComment() );
assertTrue( drl.indexOf( "global com.billasurf.Person customer2" ) >= 0 );
assertTrue( drl.indexOf( "System.out.println(version 2)" ) >= 0 );
assertTrue( drl.indexOf( "FooBarBaz2()" ) >= 0 );
assertTrue( drl.indexOf( "rule 'foo' when Goo2() then end" ) >= 0 );
assertTrue( drl.indexOf( "foo" ) >= 0 );
assertTrue( drl.indexOf( "declare Album2" ) >= 0 );
//assertEquals(12, item.getCompiledPackageBytes().length);
//Verify version 2
PackageItem item2 = impl.getRulesRepository().loadPackage( "testGetHistoryPackageSource",
2 );
ContentPackageAssembler asm2 = new ContentPackageAssembler( item2,
false );
String drl2 = asm2.getDRL();
System.out.println( drl2 );
assertEquals( "version2",
item2.getCheckinComment() );