METHOD_0 ( ) { org . apache . http . IDENT_0 IDENT_1 = mock ( org . apache . http . IDENT_0 . class ) ; org . apache . http . IDENT_2 IDENT_3 = mock ( org . apache . http . IDENT_2 . class ) ; org . apache . http . IDENT_4 IDENT_5 = mock ( org . apache . http . IDENT_4 . class ) ; org . apache . http . client . IDENT_6 IDENT_7 = mock ( org . apache . http . client . IDENT_6 . class ) ; org . apache . http . client . methods . IDENT_8 method = mock ( org . apache . http . client . methods . IDENT_8 . class ) ; when ( IDENT_1 . METHOD_1 ( ) ) . thenReturn ( IDENT_5 ) ; when ( IDENT_7 . execute ( any ( org . apache . http . client . methods . IDENT_9 . class ) ) ) . thenReturn ( IDENT_1 ) ; when ( IDENT_5 . getStatusCode ( ) ) . thenReturn ( org . pentaho . platform . util . client . IDENT_10 . IDENT_11 ) ; org . IDENT_12 . Document document = null ; when ( IDENT_1 . METHOD_2 ( ) ) . thenReturn ( IDENT_3 ) ; when ( IDENT_3 . METHOD_3 ( ) ) . METHOD_4 ( new java . io . IOException ( ) ) ; document = org . pentaho . platform . util . client . IDENT_13 . METHOD_5 ( IDENT_7 , method ) ; "<AssertPlaceHolder>" ; } METHOD_5 ( org . apache . http . client . IDENT_6 , org . apache . http . client . methods . IDENT_9 ) { try { org . apache . http . IDENT_0 IDENT_14 = client . execute ( IDENT_15 ) ; final int status = IDENT_14 . METHOD_1 ( ) . getStatusCode ( ) ; if ( status != ( org . apache . http . IDENT_16 . IDENT_17 ) ) { throw new org . pentaho . platform . util . client . METHOD_6 ( ( STRING_0 + status ) ) ; } java . io . InputStream in = IDENT_14 . METHOD_2 ( ) . METHOD_3 ( ) ; byte [ ] buffer = new byte [ INT_0 ] ; int n = in . read ( buffer ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; while ( n != ( - 1 ) ) { sb . append ( new java . lang . String ( buffer , 0 , n ) ) ; n = in . read ( buffer ) ; } java . lang . String result = sb . toString ( ) ; return org . IDENT_12 . IDENT_18 . METHOD_7 ( result ) ; } catch ( java . io . IOException e ) { throw new org . pentaho . platform . util . client . METHOD_6 ( e ) ; } catch ( org . IDENT_12 . IDENT_19 e ) { throw new org . pentaho . platform . util . client . METHOD_6 ( e ) ; } }
org . junit . Assert . assertNull ( document )