METHOD_0 ( ) { java . util . List < org . IDENT_0 . ui . common . IDENT_1 . IDENT_2 > list = new java . util . ArrayList < org . IDENT_0 . ui . common . IDENT_1 . IDENT_2 > ( ) ; list . add ( new org . IDENT_0 . ui . common . IDENT_1 . METHOD_1 ( STRING_0 , org . IDENT_0 . ui . common . IDENT_1 . web . IDENT_3 . class ) ) ; when ( IDENT_4 . query ( any ( org . IDENT_0 . ui . common . IDENT_1 . METHOD_1 . class ) ) ) . thenReturn ( list ) ; org . IDENT_0 . core . IDENT_5 . api . model . IDENT_6 t = new org . IDENT_0 . core . IDENT_5 . api . model . METHOD_2 ( ) ; t . METHOD_3 ( STRING_0 ) ; org . apache . IDENT_7 . IDENT_8 . html . IDENT_9 . IDENT_10 p = service . METHOD_4 ( t , STRING_1 ) ; "<AssertPlaceHolder>" ; } METHOD_4 ( org . IDENT_0 . core . IDENT_5 . api . model . METHOD_2 , java . lang . String ) { java . util . List < org . IDENT_0 . ui . common . IDENT_1 . METHOD_1 > IDENT_11 = persistence . query ( new org . IDENT_0 . ui . common . IDENT_1 . METHOD_1 ( task . METHOD_5 ( ) ) ) ; java . lang . Class < ? extends org . apache . IDENT_7 . IDENT_8 . html . IDENT_9 . IDENT_10 > IDENT_12 ; if ( ( IDENT_11 . size ( ) ) > 0 ) { IDENT_12 = IDENT_11 . get ( 0 ) . METHOD_6 ( ) ; } else { IDENT_12 = org . IDENT_0 . ui . common . IDENT_1 . web . IDENT_13 . class ; } try { java . lang . reflect . IDENT_14 < ? extends org . apache . IDENT_7 . IDENT_8 . html . IDENT_9 . IDENT_10 > IDENT_15 = IDENT_12 . METHOD_7 ( java . lang . String . class , org . IDENT_0 . core . IDENT_5 . api . model . METHOD_2 . class ) ; return IDENT_15 . newInstance ( IDENT_16 , task ) ; } catch ( java . lang . Exception e ) { throw new org . IDENT_0 . core . IDENT_5 . api . METHOD_8 ( e ) ; } }
org . junit . Assert . assertEquals ( p . getClass ( ) , org . IDENT_0 . ui . common . IDENT_1 . web . IDENT_3 . class )