METHOD_0 ( ) { org . IDENT_0 . model . IDENT_1 IDENT_2 = org . IDENT_0 . test . IDENT_3 . METHOD_1 ( ) ; java . util . List < org . IDENT_0 . model . IDENT_4 > IDENT_5 = new java . util . ArrayList ( ) ; org . IDENT_0 . model . IDENT_4 IDENT_6 = org . IDENT_0 . test . IDENT_3 . METHOD_2 ( IDENT_2 ) ; IDENT_6 . setId ( STRING_0 ) ; IDENT_5 . add ( IDENT_6 ) ; org . IDENT_0 . model . IDENT_4 IDENT_7 = org . IDENT_0 . test . IDENT_3 . METHOD_2 ( IDENT_2 ) ; IDENT_7 . setId ( STRING_1 ) ; IDENT_5 . add ( IDENT_7 ) ; java . util . Date now = new java . util . Date ( ) ; java . util . Map < java . lang . String , org . IDENT_0 . policy . IDENT_8 > IDENT_9 = new java . util . HashMap ( ) ; org . IDENT_0 . policy . IDENT_8 result = mock ( org . IDENT_0 . policy . IDENT_8 . class ) ; IDENT_9 . put ( STRING_0 , result ) ; IDENT_9 . put ( STRING_1 , result ) ; org . IDENT_0 . common . IDENT_10 . IDENT_11 page = mock ( org . IDENT_0 . common . IDENT_10 . IDENT_11 . class ) ; when ( page . METHOD_3 ( ) ) . thenReturn ( IDENT_5 ) ; when ( IDENT_12 . METHOD_4 ( any ( org . IDENT_0 . model . IDENT_13 . class ) , any ( java . lang . String . class ) , any ( java . lang . String . class ) , any ( java . lang . String . class ) , eq ( now ) , any ( org . IDENT_0 . model . IDENT_14 . class ) , any ( org . IDENT_0 . common . IDENT_10 . IDENT_15 . class ) , METHOD_5 ( ) , METHOD_5 ( ) , METHOD_5 ( ) , any ( java . util . Date . class ) ) ) . thenReturn ( page ) ; org . IDENT_0 . model . IDENT_16 IDENT_17 = mock ( org . IDENT_0 . model . IDENT_16 . class ) ; when ( IDENT_12 . METHOD_6 ( any ( java . util . List . class ) ) ) . thenReturn ( IDENT_17 ) ; java . util . List < org . IDENT_0 . model . IDENT_4 > IDENT_18 = java . util . Arrays . asList ( IDENT_6 ) ; when ( IDENT_17 . iterator ( ) ) . thenReturn ( IDENT_18 . METHOD_7 ( ) ) . thenReturn ( IDENT_18 . METHOD_7 ( ) ) . thenReturn ( IDENT_18 . METHOD_7 ( ) ) . thenReturn ( IDENT_18 . METHOD_7 ( ) ) ; when ( IDENT_19 . METHOD_8 ( any ( org . IDENT_0 . model . IDENT_13 . class ) , METHOD_9 ( org . IDENT_0 . model . IDENT_20 . class ) , any ( org . IDENT_0 . policy . IDENT_21 . IDENT_22 . IDENT_23 . IDENT_24 . class ) ) ) . thenReturn ( IDENT_9 ) ; when ( result . METHOD_10 ( ) ) . thenReturn ( false ) ; java . util . List < org . IDENT_0 . policy . IDENT_25 > errors = new java . util . ArrayList ( ) ; errors . add ( new org . IDENT_0 . policy . METHOD_11 ( STRING_2 ) ) ; when ( result . METHOD_12 ( ) ) . thenReturn ( errors ) ; java . util . List < org . IDENT_0 . model . IDENT_20 > IDENT_26 = new java . util . ArrayList ( ) ; IDENT_26 . add ( new org . IDENT_0 . model . METHOD_13 ( IDENT_6 , 1 ) ) ; when ( IDENT_27 . METHOD_14 ( any ( org . IDENT_0 . model . IDENT_13 . class ) , any ( java . lang . String [ ] . class ) , any ( java . util . List . class ) , any ( org . IDENT_0 . policy . IDENT_21 . IDENT_28 . IDENT_29 . class ) , any ( java . lang . String . class ) , any ( java . util . Set . class ) , eq ( false ) ) ) . thenReturn ( IDENT_26 ) ; org . IDENT_0 . resource . dto . IDENT_30 data = org . IDENT_0 . resource . dto . IDENT_30 . create ( org . IDENT_0 . test . IDENT_3 . METHOD_15 ( IDENT_31 ) , IDENT_31 ) . METHOD_16 ( new java . lang . String [ ] { IDENT_2 . METHOD_17 ( ) } ) . METHOD_18 ( now ) ; METHOD_19 ( ) . when ( IDENT_12 ) . METHOD_20 ( ) ; try { java . util . List < org . IDENT_0 . model . IDENT_32 > e = manager . METHOD_21 ( data ) ; org . junit . Assert . fail ( ) ; } catch ( org . IDENT_0 . policy . IDENT_33 e ) { "<AssertPlaceHolder>" ; verify ( IDENT_27 , times ( 4 ) ) . METHOD_14 ( any ( org . IDENT_0 . model . IDENT_13 . class ) , any ( java . lang . String [ ] . class ) , any ( java . util . List . class ) , any ( org . IDENT_0 . policy . IDENT_21 . IDENT_28 . IDENT_29 . class ) , any ( java . lang . String . class ) , any ( java . util . Set . class ) , eq ( false ) ) ; } } METHOD_21 ( org . IDENT_0 . resource . dto . IDENT_30 ) { int IDENT_34 = org . IDENT_0 . controller . IDENT_35 . IDENT_36 ; while ( true ) { try { return this . METHOD_22 ( data ) ; } catch ( org . IDENT_0 . policy . IDENT_33 e ) { boolean IDENT_37 = false ; if ( IDENT_34 > 0 ) { for ( java . lang . String IDENT_38 : e . METHOD_23 ( ) . METHOD_24 ( ) ) { java . util . List < org . IDENT_0 . policy . METHOD_11 > errors = e . METHOD_23 ( ) . get ( IDENT_38 ) . METHOD_12 ( ) ; if ( ( ( errors . size ( ) ) == 1 ) && ( errors . get ( 0 ) . METHOD_25 ( ) . equals ( STRING_2 ) ) ) { IDENT_37 = true ; break ; } } } if ( IDENT_37 ) { org . IDENT_0 . controller . IDENT_35 . log . info ( ( STRING_3 + STRING_4 ) ) ; IDENT_34 OP_0 ; continue ; } throw e ; } } }
org . junit . Assert . assertNotNull ( e )