METHOD_0 ( ) { @ org . IDENT_0 . IDENT_1 . util . METHOD_1 ( STRING_0 ) org . IDENT_0 . IDENT_1 . util . IDENT_2 < org . IDENT_0 . IDENT_1 . solution . IDENT_3 > IDENT_4 = mock ( org . IDENT_0 . IDENT_1 . util . IDENT_2 . class ) ; org . IDENT_0 . IDENT_1 . util . List < org . IDENT_0 . IDENT_1 . solution . IDENT_3 > list = new org . IDENT_0 . IDENT_1 . util . ArrayList ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { list . add ( mock ( org . IDENT_0 . IDENT_1 . solution . IDENT_3 . class ) ) ; } when ( IDENT_4 . compare ( org . mockito . Matchers . < org . IDENT_0 . IDENT_1 . solution . IDENT_3 > METHOD_2 ( ) , org . mockito . Matchers . < org . IDENT_0 . IDENT_1 . solution . IDENT_3 > METHOD_2 ( ) ) ) . thenReturn ( 1 , 0 , 0 , 1 ) ; "<AssertPlaceHolder>" ; verify ( IDENT_4 , times ( 4 ) ) . compare ( org . mockito . Matchers . < org . IDENT_0 . IDENT_1 . solution . IDENT_3 > METHOD_2 ( ) , org . mockito . Matchers . < org . IDENT_0 . IDENT_1 . solution . IDENT_3 > METHOD_2 ( ) ) ; } METHOD_3 ( org . IDENT_0 . IDENT_1 . util . List , org . IDENT_0 . IDENT_1 . util . IDENT_2 ) { if ( IDENT_5 == null ) { throw new org . IDENT_0 . IDENT_1 . util . IDENT_6 . METHOD_4 ( ) ; } else if ( IDENT_5 . isEmpty ( ) ) { throw new org . IDENT_0 . IDENT_1 . util . IDENT_6 . METHOD_5 ( ) ; } else if ( IDENT_4 == null ) { throw new org . IDENT_0 . IDENT_1 . util . METHOD_6 ( STRING_1 ) ; } int index = 0 ; IDENT_7 IDENT_8 = IDENT_5 . get ( 0 ) ; IDENT_7 IDENT_9 ; int IDENT_10 ; for ( int i = 1 ; i < ( IDENT_5 . size ( ) ) ; i ++ ) { IDENT_9 = IDENT_5 . get ( i ) ; IDENT_10 = IDENT_4 . compare ( IDENT_8 , IDENT_9 ) ; if ( IDENT_10 == 1 ) { index = i ; IDENT_8 = IDENT_9 ; } } return index ; }
org . junit . Assert . assertEquals ( 4 , org . IDENT_0 . IDENT_1 . util . IDENT_6 . METHOD_3 ( list , IDENT_4 ) )