METHOD_0 ( ) { com . IDENT_0 . http . IDENT_1 . IDENT_2 config = mock ( com . IDENT_0 . http . IDENT_1 . IDENT_2 . class ) ; when ( config . METHOD_1 ( ) ) . thenReturn ( true ) ; com . IDENT_0 . http . IDENT_1 . IDENT_3 IDENT_4 = new com . IDENT_0 . http . IDENT_1 . METHOD_2 ( config ) ; com . IDENT_0 . http . IDENT_1 . METHOD_2 client = org . IDENT_5 . api . mockito . IDENT_6 . METHOD_3 ( IDENT_4 ) ; com . IDENT_0 . http . IDENT_1 . IDENT_7 request = mock ( com . IDENT_0 . http . IDENT_1 . IDENT_7 . class ) ; when ( request . METHOD_4 ( ) ) . thenReturn ( IDENT_8 . IDENT_9 ) ; when ( request . METHOD_5 ( ) ) . thenReturn ( STRING_0 . getBytes ( ) ) ; java . net . IDENT_10 connection = mock ( java . net . IDENT_10 . class ) ; METHOD_6 ( ) . when ( connection ) . connect ( ) ; org . IDENT_5 . api . mockito . IDENT_6 . doReturn ( connection ) . when ( client , STRING_1 , request ) ; java . net . URL url = org . IDENT_5 . api . mockito . IDENT_6 . mock ( java . net . URL . class ) ; when ( url . toString ( ) ) . thenReturn ( STRING_2 ) ; when ( connection . METHOD_7 ( ) ) . thenReturn ( url ) ; java . io . IDENT_11 IDENT_12 = mock ( java . io . IDENT_11 . class ) ; METHOD_6 ( ) . when ( IDENT_12 ) . write ( STRING_0 . getBytes ( ) ) ; when ( connection . METHOD_8 ( ) ) . thenReturn ( IDENT_12 ) ; when ( connection . METHOD_9 ( ) ) . thenReturn ( mock ( java . io . InputStream . class ) ) ; org . IDENT_5 . api . mockito . IDENT_6 . METHOD_6 ( ) . when ( client , STRING_3 , any ( com . IDENT_0 . http . IDENT_1 . IDENT_13 . class ) , any ( java . net . IDENT_10 . class ) , any ( java . io . InputStream . class ) ) ; com . IDENT_0 . http . IDENT_1 . IDENT_13 response = client . METHOD_10 ( request ) ; METHOD_11 ( client , times ( 1 ) ) . invoke ( STRING_3 , any ( com . IDENT_0 . http . IDENT_1 . IDENT_13 . class ) , any ( java . net . IDENT_10 . class ) , any ( java . io . InputStream . class ) ) ; "<AssertPlaceHolder>" ; verify ( IDENT_12 , times ( 0 ) ) . write ( STRING_0 . getBytes ( ) ) ; } METHOD_12 ( ) { return url ; }
org . junit . Assert . assertEquals ( STRING_2 , response . METHOD_12 ( ) )