METHOD_0 ( int , int , java . lang . String , org . IDENT_0 . common . IDENT_1 . IDENT_2 ) { int offset = ( page - 1 ) * IDENT_3 ; int end = offset + IDENT_3 ; java . util . List < org . IDENT_0 . model . IDENT_4 > IDENT_5 = this . IDENT_6 . METHOD_1 ( ) . METHOD_2 ( ( order == ( org . hibernate . IDENT_7 . IDENT_8 . IDENT_9 ) ? org . hibernate . IDENT_7 . IDENT_8 . METHOD_3 ( IDENT_10 ) : org . hibernate . IDENT_7 . IDENT_8 . METHOD_4 ( IDENT_10 ) ) ) . list ( ) ; org . IDENT_0 . common . IDENT_1 . IDENT_11 IDENT_12 = new org . IDENT_0 . common . IDENT_1 . METHOD_5 ( ) ; IDENT_12 . METHOD_6 ( page ) ; IDENT_12 . METHOD_7 ( IDENT_3 ) ; IDENT_12 . METHOD_8 ( IDENT_10 ) ; IDENT_12 . METHOD_9 ( order ) ; org . IDENT_0 . IDENT_13 . filter . IDENT_14 IDENT_15 = new org . IDENT_0 . IDENT_13 . filter . METHOD_10 ( this . IDENT_16 , this . IDENT_17 ) ; org . jboss . IDENT_13 . core . IDENT_18 response = new org . jboss . IDENT_13 . core . METHOD_11 ( ) ; response . METHOD_12 ( this . IDENT_6 . METHOD_1 ( ) ) ; org . jboss . IDENT_13 . spi . IDENT_19 . METHOD_13 ( org . IDENT_0 . common . IDENT_1 . METHOD_5 . class , IDENT_12 ) ; IDENT_15 . METHOD_14 ( response ) ; "<AssertPlaceHolder>" ; ( ( javax . ws . rs . core . IDENT_20 ) ( response . METHOD_15 ( ) ) ) . write ( this . IDENT_21 ) ; verify ( this . IDENT_22 , times ( 1 ) ) . METHOD_16 ( ) ; for ( int i = 0 ; i < ( IDENT_5 . size ( ) ) ; ++ i ) { org . IDENT_0 . model . IDENT_4 IDENT_23 = IDENT_5 . get ( i ) ; if ( ( i < offset ) || ( i >= end ) ) { verify ( this . IDENT_24 , METHOD_17 ( ) ) . METHOD_18 ( eq ( this . IDENT_22 ) , eq ( IDENT_23 ) ) ; } else { verify ( this . IDENT_24 , times ( 1 ) ) . METHOD_18 ( eq ( this . IDENT_22 ) , eq ( IDENT_23 ) ) ; } } verify ( this . IDENT_22 , times ( 1 ) ) . METHOD_19 ( ) ; } METHOD_14 ( org . jboss . IDENT_13 . core . METHOD_11 ) { java . lang . Object entity = response . METHOD_15 ( ) ; if ( entity instanceof org . IDENT_25 . IDENT_26 ) { org . IDENT_25 . IDENT_26 IDENT_27 = ( ( org . IDENT_25 . IDENT_26 ) ( entity ) ) ; METHOD_20 ( IDENT_27 ) ; org . IDENT_0 . IDENT_28 . core . model . IDENT_29 status = this . METHOD_21 ( IDENT_27 ) ; response . METHOD_12 ( this . IDENT_30 . METHOD_22 ( status , org . IDENT_0 . dto . api . v1 . IDENT_31 . class ) ) ; response . METHOD_23 ( IDENT_32 . IDENT_33 ) ; } else if ( entity instanceof org . IDENT_25 . IDENT_26 [ ] ) { org . IDENT_25 . IDENT_26 [ ] IDENT_34 = ( ( org . IDENT_25 . IDENT_26 [ ] ) ( entity ) ) ; org . IDENT_0 . IDENT_28 . core . model . IDENT_29 [ ] IDENT_35 = new org . IDENT_0 . IDENT_28 . core . model . IDENT_29 [ IDENT_34 . length ] ; int i = 0 ; for ( org . IDENT_25 . IDENT_26 IDENT_27 : IDENT_34 ) { METHOD_20 ( IDENT_27 ) ; org . IDENT_0 . IDENT_28 . core . model . IDENT_29 status = this . METHOD_21 ( IDENT_27 ) ; IDENT_35 [ ( i ++ ) ] = status ; } org . IDENT_0 . dto . api . v1 . IDENT_31 [ ] IDENT_36 = new org . IDENT_0 . dto . api . v1 . IDENT_31 [ IDENT_35 . length ] ; for ( int j = 0 ; j < ( IDENT_35 . length ) ; j ++ ) { IDENT_36 [ j ] = this . IDENT_30 . METHOD_22 ( IDENT_35 [ j ] , org . IDENT_0 . dto . api . v1 . IDENT_31 . class ) ; } response . METHOD_12 ( IDENT_36 ) ; response . METHOD_23 ( IDENT_32 . IDENT_33 ) ; } }
org . junit . Assert . assertTrue ( ( ( response . METHOD_15 ( ) ) instanceof javax . ws . rs . core . IDENT_20 ) )