METHOD_0 ( ) { org . apache . IDENT_0 . plugin . model . IDENT_1 IDENT_2 = new org . apache . IDENT_0 . plugin . model . METHOD_1 ( ) ; IDENT_2 . setId ( 1L ) ; IDENT_2 . setName ( STRING_0 ) ; IDENT_2 . METHOD_2 ( true ) ; javax . servlet . http . IDENT_3 request = org . mockito . Mockito . mock ( javax . servlet . http . IDENT_3 . class ) ; java . lang . String IDENT_4 = STRING_0 ; org . mockito . Mockito . when ( IDENT_5 . METHOD_3 ( IDENT_4 ) ) . thenReturn ( IDENT_2 ) ; boolean isValid = IDENT_6 . METHOD_4 ( IDENT_4 , request ) ; "<AssertPlaceHolder>" ; } METHOD_4 ( java . lang . String , javax . servlet . http . IDENT_3 ) { boolean isValid = true ; if ( ( IDENT_4 == null ) || ( IDENT_4 . isEmpty ( ) ) ) { org . apache . IDENT_0 . common . IDENT_7 . LOG . error ( STRING_1 ) ; isValid = false ; throw IDENT_8 . METHOD_5 ( STRING_2 , IDENT_9 . IDENT_10 ) ; } org . apache . IDENT_0 . plugin . model . METHOD_1 service = null ; try { if ( ( null != ( request . METHOD_6 ( STRING_3 ) ) ) && ( org . apache . commons . lang . StringUtils . equalsIgnoreCase ( request . METHOD_6 ( STRING_3 ) . toString ( ) , STRING_4 ) ) ) { service = IDENT_5 . METHOD_7 ( IDENT_4 ) ; } else { service = IDENT_5 . METHOD_3 ( IDENT_4 ) ; } } catch ( java . lang . Exception e ) { isValid = false ; org . apache . IDENT_0 . common . IDENT_7 . LOG . error ( ( STRING_5 + IDENT_4 ) ) ; throw IDENT_8 . METHOD_5 ( ( ( STRING_6 + IDENT_4 ) + STRING_7 ) , IDENT_9 . IDENT_11 ) ; } if ( service == null ) { isValid = false ; org . apache . IDENT_0 . common . IDENT_7 . LOG . error ( ( STRING_5 + IDENT_4 ) ) ; throw IDENT_8 . METHOD_5 ( IDENT_12 . IDENT_13 , org . apache . IDENT_0 . plugin . util . IDENT_14 . METHOD_8 ( IDENT_4 ) , false ) ; } if ( ! ( service . METHOD_9 ( ) ) ) { isValid = false ; org . apache . IDENT_0 . common . IDENT_7 . LOG . error ( ( STRING_8 + IDENT_4 ) ) ; throw IDENT_8 . METHOD_5 ( STRING_2 , IDENT_9 . IDENT_15 ) ; } return isValid ; }
org . junit . Assert . assertTrue ( isValid )