METHOD_0 ( ) { java . lang . String IDENT_0 = STRING_0 ; org . apache . http . IDENT_1 IDENT_2 = org . mockito . Mockito . mock ( org . apache . http . IDENT_1 . class , Mockito . IDENT_3 ) ; when ( IDENT_2 . METHOD_1 ( ) . getStatusCode ( ) ) . thenReturn ( 200 ) ; when ( IDENT_2 . METHOD_2 ( ) . METHOD_3 ( ) ) . thenReturn ( null ) ; when ( IDENT_2 . METHOD_2 ( ) . METHOD_4 ( ) ) . thenReturn ( this . getClass ( ) . getResourceAsStream ( STRING_1 ) ) ; org . apache . http . IDENT_1 IDENT_4 = org . mockito . Mockito . mock ( org . apache . http . IDENT_1 . class , Mockito . IDENT_3 ) ; when ( IDENT_4 . METHOD_1 ( ) . getStatusCode ( ) ) . thenReturn ( 200 ) ; when ( IDENT_4 . METHOD_2 ( ) . METHOD_3 ( ) ) . thenReturn ( null ) ; when ( IDENT_4 . METHOD_2 ( ) . METHOD_4 ( ) ) . thenReturn ( new java . io . ByteArrayInputStream ( IDENT_5 . getBytes ( ) ) ) ; when ( IDENT_6 . execute ( any ( org . apache . http . client . methods . IDENT_7 . class ) ) ) . METHOD_5 ( new org . mockito . IDENT_8 . METHOD_6 ( ) { @ ac . IDENT_9 . IDENT_10 . Override public java . lang . Object METHOD_7 ( org . mockito . IDENT_11 . IDENT_12 IDENT_11 ) { final java . lang . String url = IDENT_11 . < org . apache . http . client . methods . IDENT_7 > METHOD_8 ( 0 ) . METHOD_9 ( ) . toString ( ) ; org . apache . http . IDENT_1 IDENT_13 = null ; if ( IDENT_0 . equals ( url ) ) { IDENT_13 = IDENT_2 ; } else if ( STRING_2 . equals ( url ) ) { IDENT_13 = IDENT_4 ; } return IDENT_13 ; } } ) ; ac . IDENT_9 . IDENT_10 . IDENT_14 IDENT_15 = new ac . IDENT_9 . IDENT_10 . METHOD_10 ( IDENT_6 , null , new java . util . ArrayList ( ) , null ) ; IDENT_15 . METHOD_11 ( true ) ; "<AssertPlaceHolder>" ; verify ( IDENT_6 , times ( 2 ) ) . execute ( any ( org . apache . http . client . methods . IDENT_7 . class ) ) ; METHOD_12 ( IDENT_16 , IDENT_6 ) ; } METHOD_13 ( java . lang . String ) { final java . lang . String IDENT_17 = java . util . Optional . METHOD_14 ( url ) . map ( String :: trim ) . METHOD_15 ( "" ) ; if ( IDENT_17 . isEmpty ( ) ) { ac . IDENT_9 . IDENT_10 . METHOD_10 . LOGGER . debug ( STRING_3 ) ; return java . util . Optional . empty ( ) ; } ac . IDENT_9 . IDENT_10 . IDENT_18 IDENT_13 = this . IDENT_16 . map ( ( IDENT_19 ) -> IDENT_19 . METHOD_16 ( this . IDENT_20 ) . get ( IDENT_17 ) ) . map ( ( element ) -> ( ( ac . IDENT_9 . IDENT_10 . IDENT_21 ) ( element . METHOD_17 ( ) ) ) ) ; if ( IDENT_13 . METHOD_18 ( ) ) { ac . IDENT_9 . IDENT_10 . METHOD_10 . LOGGER . debug ( STRING_4 , IDENT_17 ) ; return IDENT_13 ; } final java . util . Optional < ac . IDENT_9 . IDENT_10 . IDENT_22 > IDENT_23 = this . METHOD_19 ( IDENT_17 ) ; ac . IDENT_9 . IDENT_10 . METHOD_10 . LOGGER . debug ( STRING_5 , IDENT_23 , IDENT_17 ) ; IDENT_13 = IDENT_23 . map ( ( IDENT_24 ) -> this . IDENT_25 . METHOD_20 ( IDENT_24 , IDENT_26 ) . METHOD_21 ( this . IDENT_27 , this . IDENT_28 , IDENT_24 . METHOD_22 ( IDENT_17 ) ) ) . map ( this :: IDENT_29 ) . map ( ( content ) -> { ac . IDENT_9 . IDENT_10 . IDENT_21 IDENT_30 = null ; try { IDENT_30 = IDENT_31 . get ( IDENT_23 . get ( ) . METHOD_23 ( ) ) . METHOD_24 ( content ) ; } catch ( ex ) { ac . IDENT_9 . IDENT_10 . METHOD_10 . LOGGER . warn ( STRING_6 , IDENT_17 , ac . IDENT_9 . IDENT_10 . ex . getMessage ( ) ) ; } return IDENT_30 ; } ) ; if ( this . IDENT_16 . METHOD_18 ( ) ) { final net . sf . IDENT_32 . IDENT_33 cache = this . IDENT_16 . get ( ) . METHOD_16 ( this . IDENT_20 ) ; final int IDENT_34 = ( ( int ) ( java . lang . Math . min ( java . lang . Math . max ( INT_0 , IDENT_13 . map ( IDENT_21 :: IDENT_35 ) . METHOD_15 ( this . IDENT_36 ) ) , Integer . MAX_VALUE ) ) ) ; cache . put ( new net . sf . IDENT_32 . Element ( IDENT_17 , IDENT_13 . METHOD_15 ( null ) , IDENT_34 , IDENT_34 ) ) ; ac . IDENT_9 . IDENT_10 . METHOD_10 . LOGGER . debug ( STRING_7 , IDENT_13 , IDENT_34 , IDENT_17 ) ; } return IDENT_13 ; }
org . junit . Assert . assertTrue ( IDENT_15 . METHOD_13 ( IDENT_0 ) . METHOD_18 ( ) )