METHOD_0 ( ) { org . IDENT_0 . IDENT_1 . plugin . elasticsearch . model . entity . IDENT_2 IDENT_3 = org . IDENT_0 . IDENT_1 . plugin . elasticsearch . IDENT_4 . IDENT_5 . METHOD_1 ( 1 ) ; org . IDENT_0 . IDENT_1 . plugin . elasticsearch . model . entity . IDENT_2 IDENT_6 = org . IDENT_0 . IDENT_1 . plugin . elasticsearch . IDENT_4 . IDENT_5 . METHOD_1 ( 2 ) ; org . elasticsearch . action . get . IDENT_7 IDENT_8 = mock ( org . elasticsearch . action . get . IDENT_7 . class ) ; org . elasticsearch . action . IDENT_9 < org . elasticsearch . action . get . IDENT_10 > IDENT_11 = mock ( org . elasticsearch . action . IDENT_9 . class ) ; when ( IDENT_8 . execute ( ) ) . thenReturn ( IDENT_11 ) ; org . elasticsearch . action . get . IDENT_10 IDENT_12 = mock ( org . elasticsearch . action . get . IDENT_10 . class ) ; when ( IDENT_11 . METHOD_2 ( ) ) . thenReturn ( IDENT_12 ) ; org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . Iterator < org . elasticsearch . action . get . IDENT_13 > iterator = mock ( org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . Iterator . class ) ; when ( IDENT_12 . iterator ( ) ) . thenReturn ( iterator ) ; org . elasticsearch . action . get . IDENT_13 IDENT_14 = mock ( org . elasticsearch . action . get . IDENT_13 . class ) ; org . elasticsearch . action . get . IDENT_13 IDENT_15 = mock ( org . elasticsearch . action . get . IDENT_13 . class ) ; when ( iterator . hasNext ( ) ) . thenReturn ( true , true , false ) ; when ( iterator . next ( ) ) . thenReturn ( IDENT_14 , IDENT_15 ) ; doReturn ( IDENT_3 ) . when ( IDENT_16 ) . METHOD_3 ( org . IDENT_0 . IDENT_1 . plugin . elasticsearch . model . entity . IDENT_2 . class , IDENT_14 ) ; doReturn ( IDENT_6 ) . when ( IDENT_16 ) . METHOD_3 ( org . IDENT_0 . IDENT_1 . plugin . elasticsearch . model . entity . IDENT_2 . class , IDENT_15 ) ; org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . List < org . IDENT_0 . IDENT_1 . plugin . elasticsearch . model . entity . IDENT_2 > actual = IDENT_16 . METHOD_0 ( org . IDENT_0 . IDENT_1 . plugin . elasticsearch . model . entity . IDENT_2 . class , IDENT_8 ) ; "<AssertPlaceHolder>" ; } METHOD_0 ( java . lang . Class , org . elasticsearch . action . get . IDENT_7 ) { org . elasticsearch . action . get . IDENT_10 IDENT_17 = request . execute ( ) . METHOD_2 ( ) ; org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . List < T > entities = new org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . ArrayList < T > ( ) ; for ( org . elasticsearch . action . get . IDENT_13 item : IDENT_17 ) { entities . add ( METHOD_3 ( IDENT_18 , item ) ) ; } return org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . Collections . METHOD_4 ( entities ) ; }
org . junit . Assert . assertEquals ( org . IDENT_0 . IDENT_1 . plugin . elasticsearch . dao . Arrays . asList ( IDENT_3 , IDENT_6 ) , actual )