METHOD_0 ( ) { org . pentaho . platform . web . http . api . resources . IDENT_0 IDENT_1 = mock ( org . pentaho . platform . web . http . api . resources . IDENT_0 . class ) ; org . pentaho . platform . api . IDENT_2 . IDENT_3 IDENT_4 = mock ( org . pentaho . platform . api . IDENT_2 . IDENT_3 . class ) ; doReturn ( IDENT_4 ) . when ( IDENT_5 . IDENT_6 ) . METHOD_1 ( IDENT_1 ) ; java . lang . String IDENT_7 = STRING_0 ; doReturn ( IDENT_7 ) . when ( IDENT_4 ) . METHOD_2 ( ) ; javax . ws . rs . core . Response IDENT_8 = mock ( javax . ws . rs . core . Response . class ) ; doReturn ( IDENT_8 ) . when ( IDENT_5 ) . METHOD_3 ( IDENT_7 ) ; javax . ws . rs . core . Response IDENT_9 = IDENT_5 . METHOD_1 ( IDENT_1 ) ; "<AssertPlaceHolder>" ; verify ( IDENT_5 . IDENT_6 , times ( 1 ) ) . METHOD_1 ( IDENT_1 ) ; verify ( IDENT_4 , times ( 1 ) ) . METHOD_2 ( ) ; verify ( IDENT_5 , times ( 1 ) ) . METHOD_3 ( IDENT_7 ) ; } METHOD_1 ( org . pentaho . platform . web . http . api . resources . IDENT_0 ) { boolean IDENT_10 = ( ( ( IDENT_11 . METHOD_4 ( ) ) == null ) && ( ( IDENT_11 . METHOD_5 ( ) ) == null ) ) && ( ( IDENT_11 . METHOD_6 ( ) ) == null ) ; if ( ( ! IDENT_10 ) && ( ! ( METHOD_7 ( ) . METHOD_8 ( IDENT_12 . IDENT_13 ) ) ) ) { throw new java . lang . METHOD_9 ( ) ; } boolean IDENT_14 = ! ( org . apache . commons . lang . StringUtils . isEmpty ( IDENT_11 . METHOD_10 ( ) ) ) ; org . pentaho . platform . api . IDENT_15 . IDENT_16 . IDENT_17 file = null ; if ( IDENT_14 ) { try { file = METHOD_11 ( ) . METHOD_12 ( IDENT_11 . METHOD_10 ( ) ) ; } catch ( org . pentaho . platform . api . IDENT_15 . IDENT_16 . IDENT_18 IDENT_19 ) { IDENT_14 = false ; org . pentaho . platform . web . http . api . resources . services . IDENT_20 . logger . warn ( IDENT_19 . getMessage ( ) , IDENT_19 ) ; } } if ( IDENT_14 && ( org . apache . commons . lang . StringUtils . isEmpty ( IDENT_11 . METHOD_13 ( ) ) ) ) { IDENT_11 . METHOD_14 ( file . getName ( ) . substring ( 0 , file . getName ( ) . METHOD_15 ( STRING_1 ) ) ) ; } else if ( ! ( org . apache . commons . lang . StringUtils . isEmpty ( IDENT_11 . METHOD_16 ( ) ) ) ) { java . lang . String IDENT_21 = IDENT_11 . METHOD_16 ( ) . substring ( ( ( IDENT_11 . METHOD_16 ( ) . METHOD_15 ( STRING_1 ) ) + 1 ) ) ; IDENT_11 . METHOD_14 ( IDENT_21 ) ; } else if ( ( ! IDENT_14 ) && ( org . apache . commons . lang . StringUtils . isEmpty ( IDENT_11 . METHOD_13 ( ) ) ) ) { IDENT_11 . METHOD_14 ( ( "" + ( java . lang . System . currentTimeMillis ( ) ) ) ) ; } if ( IDENT_14 ) { if ( file == null ) { org . pentaho . platform . web . http . api . resources . services . IDENT_20 . logger . error ( ( ( STRING_2 + ( IDENT_11 . METHOD_10 ( ) ) ) + STRING_3 ) ) ; throw new org . pentaho . platform . api . IDENT_2 . METHOD_17 ( new org . pentaho . platform . api . engine . METHOD_18 ( ( STRING_2 + ( IDENT_11 . METHOD_10 ( ) ) ) ) ) ; } java . util . Map < java . lang . String , java . io . IDENT_22 > metadata = METHOD_11 ( ) . METHOD_19 ( file . getId ( ) ) ; if ( metadata . containsKey ( IDENT_17 . IDENT_23 ) ) { boolean IDENT_24 = org . apache . commons . lang . IDENT_25 . METHOD_20 ( ( ( java . lang . String ) ( metadata . get ( IDENT_17 . IDENT_23 ) ) ) ) ; if ( ! IDENT_24 ) { throw new java . lang . METHOD_21 ( ) ; } } } if ( ( IDENT_11 . METHOD_22 ( ) ) != null ) { METHOD_23 ( IDENT_11 ) ; } org . pentaho . platform . api . IDENT_2 . IDENT_3 job = null ; org . pentaho . platform . api . IDENT_2 . IDENT_26 IDENT_27 = org . pentaho . platform . web . http . api . resources . IDENT_28 . METHOD_24 ( IDENT_11 , IDENT_29 ) ; java . util . HashMap < java . lang . String , java . io . IDENT_22 > IDENT_30 = new java . util . HashMap ( ) ; for ( org . pentaho . platform . web . http . api . resources . IDENT_31 param : IDENT_11 . METHOD_25 ( ) ) { IDENT_30 . put ( param . getName ( ) , param . getValue ( ) ) ; } if ( METHOD_26 ( file ) ) { IDENT_30 = METHOD_27 ( file , IDENT_30 , IDENT_11 . METHOD_28 ( ) ) ; } IDENT_30 . put ( IDENT_32 . IDENT_33 , org . pentaho . platform . util . messages . IDENT_32 . METHOD_29 ( ) ) ; if ( IDENT_14 ) { org . pentaho . platform . web . http . api . resources . IDENT_34 IDENT_35 = METHOD_30 ( IDENT_11 ) ; java . lang . String IDENT_36 = IDENT_35 . METHOD_31 ( ) ; java . lang . String IDENT_37 = org . pentaho . platform . web . http . api . resources . IDENT_28 . METHOD_32 ( IDENT_11 . METHOD_10 ( ) ) ; final java . lang . String IDENT_38 = IDENT_11 . METHOD_10 ( ) ; IDENT_30 . put ( IDENT_39 . IDENT_40 , IDENT_38 ) ; job = METHOD_33 ( ) . METHOD_1 ( IDENT_11 . METHOD_13 ( ) , IDENT_37 , IDENT_30 , IDENT_27 , new org . pentaho . platform . web . http . api . resources . METHOD_34 ( IDENT_38 , IDENT_36 , METHOD_35 ( IDENT_11 ) , METHOD_36 ( IDENT_11 ) ) ) ; } else { java . lang . String IDENT_21 = IDENT_11 . METHOD_16 ( ) ; try { @ org . pentaho . platform . web . http . api . resources . services . METHOD_37 ( STRING_4 ) java . lang . Class < org . pentaho . platform . api . action . IDENT_41 > IDENT_42 = METHOD_38 ( IDENT_21 ) ; job = METHOD_33 ( ) . METHOD_1 ( IDENT_11 . METHOD_13 ( ) , IDENT_42 , IDENT_30 , IDENT_27 ) ; } catch ( java . lang . IDENT_43 e ) { throw new java . lang . RuntimeException ( e ) ; } } return job ; }
org . junit . Assert . assertEquals ( IDENT_8 , IDENT_9 )