ServiceImplementation impl = getServiceImplementation();
impl.createUser( "user1" );
impl.createUser( "user2" );
impl.createUser( "user3" );
PageRequest requestPage1 = new PageRequest( 0,
PAGE_SIZE );
PageResponse<PermissionsPageRow> responsePage1 = impl.listUserPermissions( requestPage1 );
assertNotNull( responsePage1 );
assertNotNull( responsePage1.getPageRowList() );
System.out.println( "ListUserPermissionsFullResults-page1" );
for ( PermissionsPageRow row : responsePage1.getPageRowList() ) {
System.out.println( "--> Username = " + row.getUserName() );
}
assertEquals( 0,
responsePage1.getStartRowIndex() );
assertEquals( PAGE_SIZE,
responsePage1.getPageRowList().size() );
assertFalse( responsePage1.isLastPage() );
PageRequest requestPage2 = new PageRequest( PAGE_SIZE,
PAGE_SIZE );
PageResponse<PermissionsPageRow> responsePage2 = impl.listUserPermissions( requestPage2 );
assertNotNull( responsePage2 );
assertNotNull( responsePage2.getPageRowList() );