METHOD_0 ( ) { org . easymock . EasyMock . expect ( IDENT_0 . METHOD_1 ( IDENT_1 . IDENT_2 ) ) . andReturn ( null ) . METHOD_2 ( ) ; org . easymock . EasyMock . expect ( IDENT_0 . METHOD_1 ( IDENT_1 . IDENT_3 ) ) . andReturn ( null ) . METHOD_2 ( ) ; org . easymock . EasyMock . expect ( IDENT_0 . METHOD_1 ( IDENT_1 . IDENT_4 ) ) . andReturn ( org . apache . druid . server . IDENT_5 . IDENT_6 ) . METHOD_2 ( ) ; IDENT_0 . METHOD_3 ( IDENT_1 . IDENT_2 , true ) ; org . easymock . EasyMock . METHOD_4 ( ) . METHOD_2 ( ) ; org . easymock . EasyMock . replay ( IDENT_0 ) ; javax . ws . rs . core . Response response = IDENT_7 . METHOD_5 ( new java . io . ByteArrayInputStream ( org . apache . druid . server . IDENT_5 . IDENT_8 . getBytes ( STRING_0 ) ) , null , IDENT_0 ) ; "<AssertPlaceHolder>" ; } METHOD_5 ( java . io . InputStream , java . lang . String , javax . servlet . http . IDENT_9 ) { final org . apache . druid . server . IDENT_10 IDENT_11 = IDENT_12 . METHOD_6 ( ) ; org . apache . druid . query . Query < ? > query = null ; java . lang . String IDENT_13 = req . METHOD_7 ( STRING_1 ) ; if ( com . google . common . base . IDENT_14 . METHOD_8 ( IDENT_13 ) ) { IDENT_13 = req . METHOD_9 ( ) ; } final org . apache . druid . server . IDENT_15 . IDENT_16 context = METHOD_10 ( IDENT_13 , ( IDENT_17 != null ) ) ; final java . lang . String IDENT_18 = java . lang . Thread . METHOD_11 ( ) . getName ( ) ; try { IDENT_11 . METHOD_12 ( METHOD_13 ( req , in , context ) ) ; query = IDENT_11 . METHOD_14 ( ) ; final java . lang . String IDENT_19 = query . getId ( ) ; java . lang . Thread . METHOD_11 ( ) . setName ( org . apache . druid . java . util . common . StringUtils . format ( STRING_2 , IDENT_18 , query . getType ( ) , query . METHOD_15 ( ) . METHOD_16 ( ) , IDENT_19 ) ) ; if ( org . apache . druid . server . IDENT_15 . log . METHOD_17 ( ) ) { org . apache . druid . server . IDENT_15 . log . debug ( STRING_3 , query ) ; } final org . apache . druid . server . security . IDENT_20 IDENT_21 = IDENT_11 . METHOD_18 ( req ) ; if ( ! ( IDENT_21 . METHOD_19 ( ) ) ) { throw new org . apache . druid . server . security . METHOD_20 ( IDENT_21 . toString ( ) ) ; } final org . apache . druid . server . IDENT_10 . IDENT_22 IDENT_23 = IDENT_11 . execute ( ) ; final org . apache . druid . java . util . common . IDENT_24 . IDENT_25 < ? > results = IDENT_23 . METHOD_21 ( ) ; final java . util . Map < java . lang . String , java . lang . Object > IDENT_26 = IDENT_23 . METHOD_22 ( ) ; final java . lang . String IDENT_27 = org . apache . druid . server . IDENT_15 . METHOD_23 ( req ) ; if ( ( IDENT_27 != null ) && ( IDENT_27 . equals ( IDENT_26 . get ( org . apache . druid . server . IDENT_15 . IDENT_28 ) ) ) ) { IDENT_11 . METHOD_24 ( null , req . METHOD_25 ( ) , ( - 1 ) ) ; IDENT_29 . METHOD_26 ( ) ; return javax . ws . rs . core . Response . METHOD_27 ( ) . build ( ) ; } final org . apache . druid . java . util . common . IDENT_24 . IDENT_30 < ? > IDENT_31 = org . apache . druid . java . util . common . IDENT_24 . IDENT_32 . METHOD_28 ( results ) ; try { boolean IDENT_33 = org . apache . druid . query . IDENT_34 . METHOD_29 ( query , true ) ; boolean IDENT_35 = ( org . apache . druid . query . IDENT_34 . METHOD_30 ( query , false ) ) || ( ( ! IDENT_33 ) && ( org . apache . druid . query . IDENT_34 . METHOD_31 ( query , false ) ) ) ; final com . fasterxml . jackson . databind . IDENT_36 IDENT_37 = context . METHOD_32 ( IDENT_35 ) ; javax . ws . rs . core . Response . IDENT_38 builder = javax . ws . rs . core . Response . METHOD_33 ( new javax . ws . rs . core . METHOD_34 ( ) { @ org . apache . druid . server . Override public void write ( java . io . IDENT_39 IDENT_40 ) throws javax . ws . rs . IDENT_41 { java . lang . Exception e = null ; com . google . common . io . IDENT_42 IDENT_43 = new com . google . common . io . METHOD_35 ( IDENT_40 ) ; try { IDENT_37 . METHOD_36 ( IDENT_43 , IDENT_31 ) ; IDENT_43 . METHOD_37 ( ) ; IDENT_43 . close ( ) ; } catch ( java . lang . Exception ex ) { e = ex ; org . apache . druid . server . IDENT_15 . log . error ( ex , STRING_4 ) ; throw new java . lang . RuntimeException ( ex ) ; } finally { java . lang . Thread . METHOD_11 ( ) . setName ( IDENT_18 ) ; IDENT_11 . METHOD_24 ( e , req . METHOD_25 ( ) , IDENT_43 . METHOD_38 ( ) ) ; if ( e == null ) { IDENT_29 . METHOD_26 ( ) ; } else { IDENT_44 . METHOD_26 ( ) ; } } } } , context . METHOD_9 ( ) ) . header ( STRING_5 , IDENT_19 ) ; if ( ( IDENT_26 . get ( org . apache . druid . server . IDENT_15 . IDENT_28 ) ) != null ) { builder . header ( org . apache . druid . server . IDENT_15 . IDENT_28 , IDENT_26 . get ( org . apache . druid . server . IDENT_15 . IDENT_28 ) ) ; IDENT_26 . remove ( org . apache . druid . server . IDENT_15 . IDENT_28 ) ; } org . apache . druid . client . IDENT_45 . METHOD_39 ( IDENT_26 ) ; java . lang . String IDENT_46 = IDENT_47 . METHOD_40 ( IDENT_26 ) ; if ( ( IDENT_46 . length ( ) ) > ( org . apache . druid . server . IDENT_15 . IDENT_48 ) ) { org . apache . druid . server . IDENT_15 . log . warn ( STRING_6 , IDENT_19 , IDENT_46 ) ; IDENT_46 = IDENT_46 . substring ( 0 , org . apache . druid . server . IDENT_15 . IDENT_48 ) ; } return builder . header ( STRING_7 , IDENT_46 ) . build ( ) ; } catch ( java . lang . Exception e ) { IDENT_31 . close ( ) ; throw new java . lang . RuntimeException ( e ) ; } finally { } } catch ( org . apache . druid . query . IDENT_49 e ) { IDENT_50 . METHOD_26 ( ) ; IDENT_11 . METHOD_24 ( e , req . METHOD_25 ( ) , ( - 1 ) ) ; return context . METHOD_41 ( e ) ; } catch ( org . apache . druid . server . security . METHOD_20 e ) { throw e ; } catch ( java . lang . Exception e ) { IDENT_44 . METHOD_26 ( ) ; IDENT_11 . METHOD_24 ( e , req . METHOD_25 ( ) , ( - 1 ) ) ; org . apache . druid . server . IDENT_15 . log . METHOD_42 ( e , STRING_8 ) . METHOD_43 ( STRING_6 0 , e . toString ( ) ) . METHOD_43 ( STRING_6 1 , ( query != null ? query . toString ( ) : STRING_9 ) ) . METHOD_43 ( STRING_10 , req . METHOD_25 ( ) ) . METHOD_44 ( ) ; return context . METHOD_41 ( e ) ; } finally { java . lang . Thread . METHOD_11 ( ) . setName ( IDENT_18 ) ; } }
org . junit . Assert . assertNotNull ( response )