METHOD_0 ( ) { java . net . IDENT_0 connection = METHOD_1 ( java . net . IDENT_0 . class ) ; org . apache . ambari . server . controller . internal . IDENT_1 IDENT_2 = METHOD_1 ( org . apache . ambari . server . controller . internal . IDENT_1 . class ) ; org . apache . ambari . server . controller . internal . IDENT_3 IDENT_4 = METHOD_2 ( org . apache . ambari . server . controller . internal . IDENT_3 . class ) . METHOD_3 ( Integer . IDENT_5 , Integer . IDENT_5 , java . lang . String . class , java . lang . String . class , java . lang . String . class ) . METHOD_4 ( 1000 , 1000 , STRING_0 , STRING_1 0 , STRING_2 ) . METHOD_5 ( STRING_3 ) . METHOD_5 ( STRING_4 , java . lang . String . class ) . METHOD_6 ( ) ; expect ( IDENT_4 . METHOD_7 ( ) ) . andReturn ( IDENT_2 ) . METHOD_8 ( ) ; expect ( IDENT_4 . METHOD_9 ( STRING_1 1 ) ) . andReturn ( connection ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > IDENT_6 = new java . util . HashMap ( ) ; IDENT_6 . put ( STRING_1 , java . util . Collections . singletonList ( "value" ) ) ; IDENT_6 . put ( STRING_5 , java . util . Collections . singletonList ( STRING_6 ) ) ; expect ( IDENT_2 . METHOD_10 ( STRING_1 1 ) ) . andReturn ( STRING_7 ) ; connection . METHOD_11 ( 1000 ) ; connection . METHOD_12 ( 1000 ) ; connection . METHOD_13 ( STRING_8 ) ; connection . METHOD_14 ( STRING_1 , "value" ) ; connection . METHOD_14 ( STRING_5 , STRING_1 2 ) ; replay ( IDENT_4 , connection , IDENT_2 ) ; "<AssertPlaceHolder>" ; verify ( IDENT_4 , connection , IDENT_2 ) ; } METHOD_15 ( java . lang . String , java . lang . String , byte [ ] , java . util . Map ) { if ( org . apache . ambari . server . controller . internal . IDENT_3 . LOG . METHOD_16 ( ) ) { org . apache . ambari . server . controller . internal . IDENT_3 . LOG . debug ( STRING_9 , spec ) ; } java . net . IDENT_0 connection = ( ( spec . startsWith ( STRING_10 ) ) && ( IDENT_7 ) ) ? METHOD_17 ( spec ) : METHOD_9 ( spec ) ; org . apache . ambari . server . controller . internal . IDENT_1 IDENT_2 = METHOD_7 ( ) ; java . lang . String IDENT_8 = IDENT_2 . METHOD_10 ( spec ) ; if ( IDENT_8 != null ) { org . apache . ambari . server . controller . internal . IDENT_3 . LOG . debug ( STRING_11 , spec ) ; if ( ( headers == null ) || ( headers . isEmpty ( ) ) ) { headers = java . util . Collections . METHOD_18 ( org . apache . ambari . server . controller . internal . IDENT_3 . IDENT_9 , java . util . Collections . singletonList ( IDENT_8 ) ) ; } else { headers = new java . util . HashMap ( headers ) ; java . util . List < java . lang . String > IDENT_10 = headers . get ( org . apache . ambari . server . controller . internal . IDENT_3 . IDENT_9 ) ; java . lang . String IDENT_11 = ( ( IDENT_10 == null ) || ( IDENT_10 . isEmpty ( ) ) ) ? null : IDENT_10 . get ( 0 ) ; headers . put ( org . apache . ambari . server . controller . internal . IDENT_3 . IDENT_9 , java . util . Collections . singletonList ( org . apache . ambari . server . controller . internal . IDENT_3 . METHOD_19 ( IDENT_11 , IDENT_8 ) ) ) ; } } connection . METHOD_11 ( IDENT_12 ) ; connection . METHOD_12 ( IDENT_13 ) ; connection . METHOD_20 ( true ) ; connection . METHOD_13 ( IDENT_14 ) ; if ( headers != null ) { for ( Map . Entry < java . lang . String , java . util . List < java . lang . String > > entry : headers . entrySet ( ) ) { java . lang . String IDENT_15 = entry . getValue ( ) . toString ( ) ; connection . METHOD_14 ( entry . getKey ( ) , IDENT_15 . substring ( 1 , ( ( IDENT_15 . length ( ) ) - 1 ) ) ) ; } } if ( body != null ) { connection . METHOD_21 ( ) . write ( body ) ; } int IDENT_16 = connection . METHOD_22 ( ) ; if ( IDENT_16 == ( org . apache . http . IDENT_17 . IDENT_18 ) ) { java . lang . String IDENT_19 = connection . METHOD_23 ( org . apache . ambari . server . controller . internal . IDENT_3 . IDENT_20 ) ; if ( org . apache . ambari . server . controller . internal . IDENT_3 . LOG . METHOD_24 ( ) ) { org . apache . ambari . server . controller . internal . IDENT_3 . LOG . info ( ( ( ( STRING_12 + IDENT_19 ) + STRING_13 ) + spec ) ) ; } if ( ( IDENT_19 != null ) && ( IDENT_19 . trim ( ) . startsWith ( org . apache . ambari . server . controller . internal . IDENT_3 . IDENT_21 ) ) ) { connection = ( spec . startsWith ( STRING_10 ) ) ? METHOD_17 ( spec ) : METHOD_9 ( spec ) ; IDENT_8 = IDENT_2 . METHOD_25 ( spec , true ) ; connection . METHOD_14 ( org . apache . ambari . server . controller . internal . IDENT_3 . IDENT_9 , IDENT_8 ) ; connection . METHOD_11 ( IDENT_12 ) ; connection . METHOD_12 ( IDENT_13 ) ; connection . METHOD_20 ( true ) ; return connection ; } else { org . apache . ambari . server . controller . internal . IDENT_3 . LOG . error ( ( ( ( STRING_14 + IDENT_19 ) + STRING_13 ) + spec ) ) ; return connection ; } } else { if ( ( IDENT_16 == ( org . apache . http . IDENT_17 . IDENT_22 ) ) || ( IDENT_16 == ( org . apache . http . IDENT_17 . IDENT_23 ) ) ) { org . apache . ambari . server . controller . internal . IDENT_3 . LOG . error ( java . lang . String . format ( STRING_15 , IDENT_16 , spec ) ) ; } return connection ; } }
org . junit . Assert . assertEquals ( connection , IDENT_4 . METHOD_15 ( STRING_1 1 , STRING_8 , ( ( java . lang . String ) ( null ) ) , IDENT_6 ) )