METHOD_0 ( ) { javax . servlet . http . IDENT_0 request = org . mockito . Mockito . mock ( javax . servlet . http . IDENT_0 . class ) ; java . lang . String IDENT_1 = STRING_0 ; org . apache . IDENT_2 . plugin . util . IDENT_3 IDENT_4 = new org . apache . IDENT_2 . plugin . util . METHOD_1 ( ) ; IDENT_4 . METHOD_2 ( null ) ; IDENT_4 . METHOD_3 ( true ) ; IDENT_4 . METHOD_4 ( true ) ; IDENT_4 . METHOD_5 ( STRING_1 ) ; IDENT_4 . METHOD_6 ( true ) ; org . mockito . Mockito . when ( IDENT_5 . METHOD_7 ( IDENT_1 , request ) ) . thenReturn ( false ) ; org . apache . IDENT_2 . admin . client . IDENT_6 . IDENT_7 IDENT_8 = IDENT_9 . METHOD_8 ( IDENT_1 , IDENT_4 , request ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( IDENT_5 ) . METHOD_7 ( IDENT_1 , request ) ; } METHOD_8 ( java . lang . String , org . apache . IDENT_2 . plugin . util . METHOD_1 , javax . servlet . http . IDENT_0 ) { if ( org . apache . IDENT_2 . rest . IDENT_10 . LOG . METHOD_9 ( ) ) { org . apache . IDENT_2 . rest . IDENT_10 . LOG . debug ( ( ( ( ( STRING_2 + IDENT_1 ) + STRING_3 ) + IDENT_11 ) + STRING_4 ) ) ; } org . apache . IDENT_2 . admin . client . IDENT_6 . IDENT_7 ret = new org . apache . IDENT_2 . admin . client . IDENT_6 . METHOD_10 ( ) ; org . apache . IDENT_2 . plugin . util . IDENT_12 IDENT_13 = null ; if ( IDENT_11 != null ) { if ( IDENT_5 . METHOD_7 ( IDENT_1 , request ) ) { try { if ( org . apache . IDENT_2 . plugin . util . IDENT_12 . METHOD_11 ( org . apache . IDENT_2 . rest . IDENT_10 . IDENT_14 ) ) { IDENT_13 = org . apache . IDENT_2 . plugin . util . IDENT_12 . METHOD_12 ( org . apache . IDENT_2 . rest . IDENT_10 . IDENT_14 , ( ( STRING_2 2 + IDENT_1 ) + STRING_4 ) ) ; } METHOD_13 ( IDENT_11 ) ; java . lang . String IDENT_15 = IDENT_11 . METHOD_14 ( ) ; java . util . Set < java . lang . String > IDENT_16 = ( org . apache . commons . collections . IDENT_17 . METHOD_15 ( IDENT_11 . METHOD_16 ( ) ) ) ? IDENT_11 . METHOD_16 ( ) : IDENT_18 . METHOD_17 ( IDENT_15 ) ; org . apache . IDENT_2 . plugin . IDENT_19 . IDENT_20 resource = new org . apache . IDENT_2 . plugin . IDENT_19 . METHOD_18 ( org . apache . IDENT_2 . authorization . utils . IDENT_21 . METHOD_19 ( IDENT_11 . getResource ( ) ) ) ; org . apache . IDENT_2 . view . IDENT_22 IDENT_23 = IDENT_24 . METHOD_20 ( IDENT_15 ) ; if ( ( IDENT_23 . METHOD_21 ( ) . contains ( IDENT_25 . IDENT_26 ) ) || ( IDENT_23 . METHOD_21 ( ) . contains ( IDENT_25 . IDENT_27 ) ) ) { org . apache . IDENT_2 . view . IDENT_28 IDENT_29 = new org . apache . IDENT_2 . view . METHOD_22 ( ) ; IDENT_29 . METHOD_23 ( IDENT_30 . IDENT_31 ) ; IDENT_29 . METHOD_24 ( ( ( ( STRING_5 + STRING_6 ) + ( IDENT_23 . getId ( ) ) ) + STRING_7 ) ) ; throw IDENT_32 . METHOD_25 ( IDENT_29 ) ; } boolean IDENT_33 = METHOD_26 ( IDENT_1 , IDENT_15 , IDENT_16 , resource ) ; if ( ! IDENT_33 ) { throw IDENT_32 . METHOD_27 ( STRING_8 ) ; } org . apache . IDENT_2 . plugin . model . IDENT_34 policy = METHOD_28 ( IDENT_1 , resource , IDENT_15 ) ; if ( policy != null ) { boolean IDENT_35 = false ; IDENT_35 = org . apache . IDENT_2 . rest . IDENT_36 . METHOD_29 ( policy , IDENT_11 ) ; if ( IDENT_35 ) { policy . METHOD_30 ( IDENT_11 . METHOD_31 ( ) ) ; IDENT_37 . METHOD_32 ( policy ) ; } else { org . apache . IDENT_2 . rest . IDENT_10 . LOG . error ( STRING_9 ) ; throw new java . lang . Exception ( STRING_9 ) ; } } else { policy = new org . apache . IDENT_2 . plugin . model . METHOD_33 ( ) ; policy . METHOD_34 ( IDENT_1 ) ; policy . setName ( ( STRING_2 3 + ( java . lang . System . currentTimeMillis ( ) ) ) ) ; policy . METHOD_35 ( STRING_10 ) ; policy . METHOD_36 ( IDENT_11 . METHOD_37 ( ) ) ; policy . METHOD_38 ( IDENT_15 ) ; java . util . Map < java . lang . String , org . apache . IDENT_2 . plugin . model . METHOD_33 . IDENT_38 > IDENT_39 = new java . util . HashMap < java . lang . String , org . apache . IDENT_2 . plugin . model . METHOD_33 . IDENT_38 > ( ) ; java . util . Set < java . lang . String > IDENT_40 = resource . METHOD_39 ( ) ; if ( ! ( org . apache . commons . collections . IDENT_17 . isEmpty ( IDENT_40 ) ) ) { for ( java . lang . String IDENT_41 : IDENT_40 ) { org . apache . IDENT_2 . plugin . model . METHOD_33 . IDENT_38 IDENT_42 = new org . apache . IDENT_2 . plugin . model . METHOD_33 . METHOD_40 ( ( ( java . lang . String ) ( resource . getValue ( IDENT_41 ) ) ) ) ; IDENT_42 . METHOD_6 ( IDENT_11 . METHOD_41 ( ) ) ; IDENT_39 . put ( IDENT_41 , IDENT_42 ) ; } } policy . METHOD_42 ( IDENT_39 ) ; org . apache . IDENT_2 . plugin . model . METHOD_33 . IDENT_43 IDENT_44 = new org . apache . IDENT_2 . plugin . model . METHOD_33 . METHOD_43 ( ) ; IDENT_44 . METHOD_3 ( IDENT_11 . METHOD_44 ( ) ) ; IDENT_44 . METHOD_45 ( ) . addAll ( IDENT_11 . METHOD_45 ( ) ) ; IDENT_44 . METHOD_46 ( ) . addAll ( IDENT_11 . METHOD_46 ( ) ) ; for ( java . lang . String IDENT_45 : IDENT_11 . METHOD_47 ( ) ) { IDENT_44 . METHOD_48 ( ) . add ( new org . apache . IDENT_2 . plugin . model . METHOD_33 . METHOD_49 ( IDENT_45 , Boolean . IDENT_46 ) ) ; } policy . METHOD_50 ( ) . add ( IDENT_44 ) ; policy . METHOD_30 ( IDENT_11 . METHOD_31 ( ) ) ; IDENT_37 . METHOD_51 ( policy ) ; } } catch ( javax . ws . rs . IDENT_47 IDENT_48 ) { throw IDENT_48 ; } catch ( java . lang . Throwable IDENT_48 ) { org . apache . IDENT_2 . rest . IDENT_10 . LOG . error ( ( ( ( ( STRING_11 + IDENT_1 ) + STRING_3 ) + IDENT_11 ) + STRING_2 0 ) , IDENT_48 ) ; throw IDENT_32 . METHOD_52 ( IDENT_48 . getMessage ( ) ) ; } finally { org . apache . IDENT_2 . plugin . util . IDENT_12 . log ( IDENT_13 ) ; } ret . METHOD_23 ( METHOD_10 . IDENT_49 ) ; } } if ( org . apache . IDENT_2 . rest . IDENT_10 . LOG . METHOD_9 ( ) ) { org . apache . IDENT_2 . rest . IDENT_10 . LOG . debug ( ( ( ( ( ( STRING_2 1 + IDENT_1 ) + STRING_3 ) + IDENT_11 ) + STRING_2 4 ) + ret ) ) ; } return ret ; }
org . junit . Assert . assertNotNull ( IDENT_8 )