METHOD_0 ( ) { conf . METHOD_1 ( IDENT_0 . IDENT_1 . IDENT_2 , STRING_0 ) ; javax . IDENT_3 . IDENT_4 < javax . IDENT_3 . directory . IDENT_5 > IDENT_6 = METHOD_2 ( STRING_1 ) ; when ( ctx . search ( anyString ( ) , anyString ( ) , any ( javax . IDENT_3 . directory . IDENT_7 . class ) ) ) . thenReturn ( null ) . thenReturn ( IDENT_6 ) ; search = new org . apache . hive . service . auth . ldap . METHOD_3 ( conf , ctx ) ; java . lang . String expected = STRING_1 ; java . lang . String actual = search . METHOD_4 ( STRING_2 ) ; "<AssertPlaceHolder>" ; verify ( ctx ) . search ( eq ( STRING_3 ) , contains ( STRING_4 ) , any ( javax . IDENT_3 . directory . IDENT_7 . class ) ) ; verify ( ctx ) . search ( eq ( STRING_3 ) , contains ( STRING_5 ) , any ( javax . IDENT_3 . directory . IDENT_7 . class ) ) ; } METHOD_4 ( java . lang . String ) { java . util . List < java . lang . String > IDENT_8 ; if ( org . apache . hive . service . auth . ldap . IDENT_9 . METHOD_5 ( user ) ) { java . lang . String IDENT_10 = org . apache . hive . service . auth . ldap . IDENT_9 . METHOD_6 ( user ) ; java . lang . String IDENT_11 = org . apache . hive . service . auth . ldap . IDENT_9 . METHOD_7 ( user ) ; IDENT_8 = execute ( java . util . Collections . singletonList ( IDENT_10 ) , IDENT_12 . METHOD_8 ( IDENT_11 ) ) . METHOD_9 ( ) ; } else { IDENT_8 = METHOD_10 ( IDENT_13 , user ) ; if ( IDENT_8 . isEmpty ( ) ) { IDENT_8 = execute ( IDENT_14 , IDENT_12 . METHOD_11 ( user ) ) . METHOD_9 ( ) ; } } if ( ( IDENT_8 . size ( ) ) == 1 ) { return IDENT_8 . get ( 0 ) ; } else { org . apache . hive . service . auth . ldap . METHOD_3 . LOG . info ( STRING_6 , user , IDENT_8 . size ( ) ) ; org . apache . hive . service . auth . ldap . METHOD_3 . LOG . debug ( STRING_7 , IDENT_8 ) ; return null ; } }
org . junit . Assert . assertEquals ( expected , actual )