repositoryPackageService.listSnapshots( "testSnapshotDiffPagedResultsPackage" ).length );
assertEquals( 4,
repositoryPackageService.listRulesInPackage( "testSnapshotDiffPagedResultsPackage" ).length );
// Compare the snapshots
SnapshotComparisonPageRequest request = new SnapshotComparisonPageRequest( "testSnapshotDiffPagedResultsPackage",
"FIRST",
"SECOND",
0,
PAGE_SIZE );
SnapshotComparisonPageResponse response;
response = repositoryPackageService.compareSnapshots( request );
assertEquals( "FIRST",
response.getLeftSnapshotName() );
assertEquals( "SECOND",
response.getRightSnapshotName() );
assertNotNull( response );
assertNotNull( response.getPageRowList() );
assertTrue( response.getStartRowIndex() == 0 );
assertTrue( response.getPageRowList().size() == PAGE_SIZE );
assertFalse( response.isLastPage() );
request.setStartRowIndex( PAGE_SIZE );
response = repositoryPackageService.compareSnapshots( request );
assertNotNull( response );
assertNotNull( response.getPageRowList() );
assertTrue( response.getStartRowIndex() == PAGE_SIZE );
assertTrue( response.getPageRowList().size() == PAGE_SIZE );
assertFalse( response.isLastPage() );
request.setStartRowIndex( PAGE_SIZE * 2 );
response = repositoryPackageService.compareSnapshots( request );
assertNotNull( response );
assertNotNull( response.getPageRowList() );
assertTrue( response.getStartRowIndex() == PAGE_SIZE * 2 );