METHOD_0 ( ) { org . apache . ambari . server . configuration . Configuration configuration = mock ( org . apache . ambari . server . configuration . Configuration . class ) ; when ( configuration . METHOD_1 ( ) ) . thenReturn ( 100 ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_1 IDENT_2 = mock ( org . apache . ambari . server . api . services . IDENT_0 . IDENT_1 . class ) ; org . apache . ambari . server . api . services . IDENT_3 IDENT_4 = mock ( org . apache . ambari . server . api . services . IDENT_3 . class ) ; org . apache . ambari . server . state . IDENT_5 service = mock ( org . apache . ambari . server . state . IDENT_5 . class ) ; when ( IDENT_4 . METHOD_2 ( org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( service ) ; when ( service . METHOD_3 ( ) ) . thenReturn ( IDENT_5 . IDENT_6 . IDENT_7 ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_8 helper = org . apache . ambari . server . api . services . IDENT_0 . IDENT_9 . METHOD_4 ( configuration , IDENT_2 , IDENT_4 ) ; org . apache . ambari . server . api . services . IDENT_0 . commands . IDENT_10 < org . apache . ambari . server . api . services . IDENT_0 . IDENT_11 . IDENT_12 > command = mock ( org . apache . ambari . server . api . services . IDENT_0 . commands . IDENT_10 . class ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_11 . IDENT_12 expected = mock ( org . apache . ambari . server . api . services . IDENT_0 . IDENT_11 . IDENT_12 . class ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 . IDENT_14 IDENT_15 = org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 . IDENT_14 . IDENT_16 ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 request = org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 . IDENT_17 . METHOD_5 ( STRING_0 , STRING_1 ) . METHOD_6 ( IDENT_15 ) . build ( ) ; when ( command . invoke ( request , IDENT_5 . IDENT_6 . IDENT_7 ) ) . thenReturn ( expected ) ; doReturn ( command ) . when ( helper ) . METHOD_7 ( STRING_2 , request ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_11 . IDENT_12 response = helper . METHOD_8 ( request ) ; "<AssertPlaceHolder>" ; } METHOD_8 ( org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 ) { IDENT_18 = METHOD_9 ( ) ; java . lang . String IDENT_19 = STRING_2 ; org . apache . ambari . server . state . IDENT_5 . IDENT_6 IDENT_20 = METHOD_3 ( request . METHOD_10 ( ) , request . METHOD_11 ( ) , IDENT_19 ) ; org . apache . ambari . server . api . services . IDENT_0 . commands . IDENT_10 < org . apache . ambari . server . api . services . IDENT_0 . IDENT_11 . IDENT_12 > command = METHOD_7 ( IDENT_19 , request ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 . IDENT_14 IDENT_15 = request . METHOD_12 ( ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_11 . IDENT_12 response = null ; if ( IDENT_15 == ( org . apache . ambari . server . api . services . IDENT_0 . IDENT_13 . IDENT_14 . IDENT_21 ) ) { java . lang . String hash = METHOD_13 ( request ) ; org . apache . ambari . server . api . services . IDENT_0 . IDENT_8 . LOG . info ( java . lang . String . format ( STRING_3 , hash , request . METHOD_14 ( ) ) ) ; response = IDENT_22 . METHOD_15 ( hash , ( IDENT_23 ) -> { try { org . apache . ambari . server . api . services . IDENT_0 . IDENT_8 . LOG . info ( java . lang . String . format ( STRING_4 , hash , request . METHOD_14 ( ) ) ) ; return command . invoke ( request , IDENT_20 ) ; } catch ( e ) { return null ; } } ) ; } return response == null ? command . invoke ( request , IDENT_20 ) : response ; }
org . junit . Assert . assertEquals ( expected , response )