METHOD_0 ( ) { com . IDENT_0 . service . IDENT_1 . impl . test . Mockito . METHOD_1 ( IDENT_2 ) ; java . util . List < com . IDENT_0 . domain . model . IDENT_3 > list = new java . util . ArrayList < com . IDENT_0 . domain . model . IDENT_3 > ( ) ; long IDENT_4 = INT_0 ; long IDENT_5 = java . lang . Long . METHOD_2 ( STRING_0 ) ; long IDENT_6 = IDENT_5 + IDENT_4 ; for ( int i = 0 ; i < 20 ; i ++ ) { com . IDENT_0 . domain . model . IDENT_3 IDENT_7 = new com . IDENT_0 . domain . model . METHOD_3 ( ) ; IDENT_7 . setId ( i ) ; IDENT_7 . METHOD_4 ( new java . util . Date ( IDENT_5 ) ) ; IDENT_7 . METHOD_5 ( new java . util . Date ( IDENT_6 ) ) ; list . add ( IDENT_7 ) ; } when ( IDENT_2 . METHOD_6 ( com . IDENT_0 . service . IDENT_1 . impl . test . Mockito . any ( com . IDENT_0 . domain . mapper . model . IDENT_8 . class ) ) ) . thenReturn ( list ) ; long ret = IDENT_9 . METHOD_7 ( IDENT_10 . IDENT_11 , 1 ) ; "<AssertPlaceHolder>" ; } METHOD_7 ( java . lang . Integer , java . lang . Integer ) { com . IDENT_0 . domain . model . METHOD_3 IDENT_12 = new com . IDENT_0 . domain . model . METHOD_3 ( ) ; IDENT_12 . METHOD_8 ( IDENT_11 ) ; IDENT_12 . METHOD_9 ( 0 ) ; com . IDENT_0 . domain . mapper . model . IDENT_8 example = new com . IDENT_0 . domain . mapper . model . METHOD_10 ( IDENT_12 ) ; org . joda . time . IDENT_13 IDENT_14 = new org . joda . time . METHOD_11 ( new java . util . Date ( ) ) ; java . util . Date IDENT_15 = IDENT_14 . METHOD_12 ( ) . METHOD_13 ( ( - IDENT_16 ) ) . METHOD_14 ( ) ; java . util . Date IDENT_17 = IDENT_14 . METHOD_12 ( ) . METHOD_15 ( 1 ) . METHOD_14 ( ) ; example . METHOD_16 ( ) . get ( 0 ) . METHOD_17 ( IDENT_15 ) . METHOD_18 ( IDENT_17 ) ; java . util . List < com . IDENT_0 . domain . model . METHOD_3 > results = IDENT_18 . METHOD_6 ( example ) ; int length = results . size ( ) ; if ( length < ( com . IDENT_0 . service . IDENT_1 . impl . IDENT_19 . IDENT_20 ) ) return 0L ; else { java . lang . Long result = 0L ; for ( com . IDENT_0 . domain . model . METHOD_3 IDENT_7 : results ) { result += ( IDENT_7 . METHOD_19 ( ) . getTime ( ) ) - ( IDENT_7 . METHOD_20 ( ) . getTime ( ) ) ; } return result / length ; } }
org . junit . Assert . assertEquals ( IDENT_4 , ret )