METHOD_0 ( ) { final com . spotify . IDENT_0 . IDENT_1 proxy = mock ( com . spotify . IDENT_0 . IDENT_1 . class ) ; final com . spotify . IDENT_0 . IDENT_2 IDENT_3 = METHOD_1 ( ) ; final com . spotify . IDENT_4 . client . IDENT_5 IDENT_6 = METHOD_2 ( com . google . common . base . Optional . of ( proxy ) , com . google . common . collect . ImmutableList . of ( IDENT_3 ) ) ; final java . lang . String path = STRING_0 ; final javax . net . IDENT_7 . IDENT_8 connection = mock ( javax . net . IDENT_7 . IDENT_8 . class ) ; when ( IDENT_9 . connect ( METHOD_3 ( METHOD_4 ( path ) ) , eq ( method ) , eq ( entity ) , METHOD_3 ( METHOD_5 ( java . util . Collections . singletonList ( STRING_1 ) ) ) ) ) . thenReturn ( connection ) ; when ( connection . METHOD_6 ( ) ) . thenReturn ( 200 ) ; final java . net . URI uri = new java . net . URI ( ( STRING_2 + path ) ) ; final java . net . IDENT_10 IDENT_11 = IDENT_6 . connect ( uri , method , entity , headers ) ; "<AssertPlaceHolder>" ; verify ( IDENT_9 ) . METHOD_7 ( METHOD_8 ( com . spotify . IDENT_12 . IDENT_13 . class ) ) ; } connect ( java . net . URI , java . lang . String , byte [ ] , java . util . Map ) { final com . spotify . IDENT_4 . client . IDENT_14 IDENT_15 = IDENT_16 . next ( ) ; final java . lang . String IDENT_17 = IDENT_15 . METHOD_9 ( ) . METHOD_10 ( ) ; try { final java . net . IDENT_10 connection = METHOD_11 ( uri , method , entity , headers , IDENT_17 ) ; if ( ( connection . METHOD_6 ( ) ) == ( IDENT_18 ) ) { throw new com . spotify . IDENT_4 . common . METHOD_12 ( java . lang . String . format ( STRING_3 , uri , connection . METHOD_6 ( ) ) ) ; } return connection ; } catch ( java . net . IDENT_19 | java . net . IDENT_20 | java . net . IDENT_21 e ) { com . spotify . IDENT_4 . client . IDENT_22 . log . debug ( e . toString ( ) ) ; throw new com . spotify . IDENT_4 . common . METHOD_12 ( ( STRING_4 + uri ) , e ) ; } catch ( java . io . IOException e ) { throw new com . spotify . IDENT_4 . common . METHOD_12 ( ( STRING_5 + uri ) , e ) ; } }
org . junit . Assert . assertSame ( IDENT_11 , connection )