METHOD_0 ( ) { final org . joda . time . IDENT_0 now = new org . joda . time . METHOD_1 ( ) . METHOD_2 ( 0 ) . METHOD_3 ( 0 ) . METHOD_4 ( IDENT_1 . IDENT_2 ) ; org . joda . time . METHOD_1 IDENT_3 = now . METHOD_5 ( 1 ) ; com . IDENT_4 . IDENT_5 . servlet . IDENT_6 IDENT_7 = com . IDENT_4 . IDENT_5 . servlet . IDENT_8 . METHOD_6 ( STRING_0 ) ; IDENT_7 . METHOD_7 ( java . lang . String . format ( STRING_1 , IDENT_3 . METHOD_8 ( ) , IDENT_3 . METHOD_9 ( ) ) ) ; IDENT_7 . setId ( 1L ) ; com . IDENT_4 . IDENT_5 . servlet . IDENT_6 IDENT_9 = com . IDENT_4 . IDENT_5 . servlet . IDENT_8 . METHOD_6 ( STRING_2 ) ; org . joda . time . METHOD_1 IDENT_10 = IDENT_3 . METHOD_10 ( INT_0 ) ; IDENT_9 . METHOD_7 ( java . lang . String . format ( STRING_1 , IDENT_10 . METHOD_8 ( ) , IDENT_10 . METHOD_9 ( ) ) ) ; IDENT_9 . setId ( INT_1 ) ; com . IDENT_4 . IDENT_5 . servlet . List < com . IDENT_4 . IDENT_5 . servlet . IDENT_6 > IDENT_11 = new com . IDENT_4 . IDENT_5 . servlet . ArrayList ( ) ; IDENT_11 . add ( IDENT_9 ) ; IDENT_11 . add ( IDENT_7 ) ; when ( IDENT_12 . METHOD_11 ( ) ) . thenReturn ( IDENT_11 ) ; com . IDENT_4 . IDENT_5 . servlet . List < com . IDENT_4 . IDENT_5 . servlet . IDENT_13 > expected = new com . IDENT_4 . IDENT_5 . servlet . ArrayList ( ) ; com . IDENT_4 . IDENT_5 . servlet . IDENT_13 IDENT_14 = new com . IDENT_4 . IDENT_5 . servlet . METHOD_12 ( IDENT_7 . getName ( ) , com . IDENT_4 . IDENT_5 . servlet . IDENT_15 . METHOD_13 ( now , IDENT_7 ) ) ; com . IDENT_4 . IDENT_5 . servlet . METHOD_12 IDENT_16 = new com . IDENT_4 . IDENT_5 . servlet . METHOD_12 ( IDENT_9 . getName ( ) , com . IDENT_4 . IDENT_5 . servlet . IDENT_15 . METHOD_13 ( now , IDENT_9 ) ) ; expected . add ( IDENT_14 ) ; expected . add ( IDENT_16 ) ; com . IDENT_4 . IDENT_5 . servlet . METHOD_12 IDENT_17 = new com . IDENT_4 . IDENT_5 . servlet . METHOD_12 ( IDENT_7 . getName ( ) , com . IDENT_4 . IDENT_5 . servlet . IDENT_15 . METHOD_13 ( IDENT_16 . getTime ( ) , IDENT_7 ) ) ; com . IDENT_4 . IDENT_5 . servlet . METHOD_12 IDENT_18 = new com . IDENT_4 . IDENT_5 . servlet . METHOD_12 ( IDENT_9 . getName ( ) , com . IDENT_4 . IDENT_5 . servlet . IDENT_15 . METHOD_13 ( IDENT_16 . getTime ( ) , IDENT_9 ) ) ; expected . add ( IDENT_17 ) ; expected . add ( IDENT_18 ) ; int IDENT_19 = 4 ; "<AssertPlaceHolder>" ; org . springframework . test . web . servlet . request . IDENT_20 IDENT_21 = get ( java . lang . String . format ( STRING_3 , IDENT_19 ) ) ; IDENT_22 . METHOD_14 ( IDENT_21 ) . METHOD_15 ( content ( ) . string ( IDENT_23 . METHOD_16 ( expected ) ) ) . METHOD_15 ( status ( ) . METHOD_17 ( ) ) ; when ( IDENT_12 . METHOD_18 ( IDENT_7 . getId ( ) ) ) . thenReturn ( IDENT_7 ) ; com . IDENT_4 . IDENT_5 . servlet . List < com . IDENT_4 . IDENT_5 . servlet . METHOD_12 > IDENT_24 = new com . IDENT_4 . IDENT_5 . servlet . ArrayList ( ) ; IDENT_24 . add ( IDENT_14 ) ; IDENT_24 . add ( IDENT_17 ) ; IDENT_19 = 2 ; org . springframework . test . web . servlet . request . IDENT_20 IDENT_25 = get ( java . lang . String . format ( STRING_4 , IDENT_19 , IDENT_7 . getId ( ) ) ) ; IDENT_22 . METHOD_14 ( IDENT_25 ) . METHOD_15 ( content ( ) . string ( IDENT_23 . METHOD_16 ( IDENT_24 ) ) ) . METHOD_15 ( status ( ) . METHOD_17 ( ) ) ; } METHOD_19 ( java . lang . Long , int ) { com . IDENT_4 . IDENT_5 . servlet . List < com . IDENT_4 . IDENT_5 . servlet . METHOD_12 > IDENT_26 = new com . IDENT_4 . IDENT_5 . servlet . ArrayList ( ) ; com . IDENT_4 . IDENT_5 . servlet . List < com . IDENT_4 . IDENT_5 . servlet . IDENT_6 > IDENT_27 ; if ( id == null ) { IDENT_27 = IDENT_12 . METHOD_11 ( ) ; } else { IDENT_27 = com . IDENT_4 . IDENT_5 . servlet . Arrays . asList ( new com . IDENT_4 . IDENT_5 . servlet . IDENT_6 [ ] { IDENT_12 . METHOD_18 ( id ) } ) ; } if ( ( IDENT_27 . size ( ) ) == 0 ) { return IDENT_26 ; } org . joda . time . METHOD_1 from = new org . joda . time . METHOD_1 ( ) . METHOD_4 ( IDENT_1 . IDENT_2 ) ; while ( ( IDENT_26 . size ( ) ) < IDENT_19 ) { METHOD_20 ( IDENT_26 , from , IDENT_27 ) ; com . IDENT_4 . IDENT_5 . servlet . Collections . METHOD_21 ( IDENT_26 ) ; from = IDENT_26 . get ( ( ( IDENT_26 . size ( ) ) - 1 ) ) . getTime ( ) ; } return IDENT_26 ; }
org . junit . Assert . assertEquals ( expected , controller . METHOD_19 ( null , IDENT_19 ) )