METHOD_0 ( ) { int offset = 1 ; java . lang . String IDENT_0 = IDENT_1 . METHOD_1 ( ) . get ( offset ) ; org . finra . herd . model . api . xml . IDENT_2 IDENT_3 = new org . finra . herd . model . api . xml . METHOD_2 ( IDENT_4 , IDENT_0 ) ; org . finra . herd . model . api . xml . IDENT_5 IDENT_6 = new org . finra . herd . model . api . xml . METHOD_3 ( IDENT_3 ) ; when ( IDENT_7 . METHOD_4 ( IDENT_3 , offset ) ) . thenReturn ( IDENT_6 ) ; org . finra . herd . model . api . xml . METHOD_3 IDENT_8 = IDENT_9 . METHOD_4 ( org . finra . herd . rest . IDENT_4 , IDENT_0 , offset ) ; verify ( IDENT_7 ) . METHOD_4 ( IDENT_3 , offset ) ; METHOD_5 ( IDENT_7 ) ; "<AssertPlaceHolder>" ; } METHOD_4 ( org . finra . herd . model . api . xml . METHOD_2 , int ) { javax . persistence . criteria . IDENT_10 builder = IDENT_11 . METHOD_6 ( ) ; javax . persistence . criteria . IDENT_12 < org . finra . herd . model . jpa . IDENT_13 > criteria = builder . METHOD_7 ( org . finra . herd . model . jpa . IDENT_13 . class ) ; javax . persistence . criteria . IDENT_14 < org . finra . herd . model . jpa . IDENT_13 > IDENT_15 = criteria . from ( org . finra . herd . model . jpa . IDENT_13 . class ) ; javax . persistence . criteria . IDENT_16 < org . finra . herd . model . jpa . IDENT_13 , org . finra . herd . model . jpa . IDENT_17 > IDENT_18 = IDENT_15 . join ( IDENT_19 . IDENT_20 ) ; javax . persistence . criteria . IDENT_21 IDENT_22 = builder . equal ( builder . METHOD_8 ( IDENT_18 . get ( IDENT_23 . IDENT_24 ) ) , IDENT_3 . METHOD_9 ( ) . METHOD_10 ( ) ) ; javax . persistence . criteria . IDENT_25 IDENT_26 = null ; if ( offset == 0 ) { IDENT_22 = builder . and ( IDENT_22 , builder . equal ( IDENT_15 . get ( IDENT_19 . IDENT_27 ) , IDENT_3 . METHOD_4 ( ) ) ) ; } else if ( offset > 0 ) { IDENT_22 = builder . and ( IDENT_22 , builder . METHOD_11 ( IDENT_15 . get ( IDENT_19 . IDENT_27 ) , IDENT_3 . METHOD_4 ( ) ) ) ; IDENT_26 = builder . METHOD_12 ( IDENT_15 . get ( IDENT_19 . IDENT_27 ) ) ; } else { IDENT_22 = builder . and ( IDENT_22 , builder . METHOD_13 ( IDENT_15 . get ( IDENT_19 . IDENT_27 ) , IDENT_3 . METHOD_4 ( ) ) ) ; IDENT_26 = builder . METHOD_14 ( IDENT_15 . get ( IDENT_19 . IDENT_27 ) ) ; } if ( offset == 0 ) { criteria . select ( IDENT_15 ) . METHOD_15 ( IDENT_22 ) ; return METHOD_16 ( criteria , java . lang . String . format ( STRING_0 , IDENT_3 . METHOD_9 ( ) , IDENT_3 . METHOD_4 ( ) ) ) ; } else { criteria . select ( IDENT_15 ) . METHOD_15 ( IDENT_22 ) . METHOD_17 ( IDENT_26 ) ; java . util . List < org . finra . herd . model . jpa . IDENT_13 > IDENT_28 = IDENT_11 . METHOD_7 ( criteria ) . METHOD_18 ( java . lang . Math . METHOD_19 ( offset ) ) . METHOD_20 ( 1 ) . METHOD_21 ( ) ; return ( IDENT_28 . size ( ) ) > 0 ? IDENT_28 . get ( 0 ) : null ; } }
org . junit . Assert . assertEquals ( IDENT_6 , IDENT_8 )