METHOD_0 ( ) { javax . ws . rs . core . Response IDENT_0 = javax . ws . rs . core . Response . METHOD_1 ( ) . status ( new java . lang . Integer ( 3 ) ) . type ( IDENT_1 . IDENT_2 ) . build ( ) ; org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . IDENT_5 IDENT_6 = new org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . METHOD_2 ( ) ; java . io . InputStream IDENT_7 = mock ( java . io . InputStream . class ) ; java . util . List < com . sun . jersey . IDENT_8 . IDENT_9 > IDENT_10 = mock ( java . util . List . class ) ; java . util . List < com . sun . jersey . core . header . IDENT_11 > IDENT_12 = mock ( java . util . List . class ) ; doReturn ( IDENT_6 ) . when ( org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . IDENT_13 . IDENT_14 . service ) . METHOD_0 ( IDENT_7 , IDENT_10 ) ; doReturn ( IDENT_0 ) . when ( org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . IDENT_13 . IDENT_14 ) . METHOD_3 ( STRING_0 ) ; java . lang . String res = org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . IDENT_13 . IDENT_14 . METHOD_0 ( IDENT_7 , IDENT_10 ) ; verify ( org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . IDENT_13 . IDENT_14 , times ( 1 ) ) . METHOD_0 ( IDENT_7 , IDENT_10 ) ; "<AssertPlaceHolder>" ; } METHOD_4 ( ) { org . json . JSONObject obj = new org . json . JSONObject ( ) ; try { if ( ( IDENT_15 ) != null ) { obj . put ( STRING_1 , IDENT_15 ) ; } org . json . IDENT_16 list = new org . json . METHOD_5 ( ) ; for ( int i = 0 ; i < ( IDENT_17 . size ( ) ) ; i ++ ) { org . pentaho . platform . IDENT_3 . IDENT_4 . api . resources . IDENT_18 IDENT_19 = IDENT_17 . get ( i ) ; list . put ( IDENT_19 . METHOD_6 ( ) ) ; } if ( ( list . length ( ) ) > 0 ) { obj . put ( STRING_2 , list ) ; } } catch ( org . json . IDENT_20 e ) { } return obj . toString ( ) ; }
org . junit . Assert . assertEquals ( IDENT_6 . METHOD_4 ( ) , res )