METHOD_0 ( ) { final org . apache . IDENT_0 . persistence . core . IDENT_1 . IDENT_2 IDENT_1 = mock ( org . apache . IDENT_0 . persistence . core . IDENT_1 . IDENT_2 . class ) ; when ( IDENT_1 . METHOD_1 ( ) ) . thenReturn ( new org . apache . IDENT_0 . persistence . model . entity . METHOD_2 ( org . apache . IDENT_0 . persistence . model . util . IDENT_3 . METHOD_3 ( ) , STRING_0 ) ) ; final com . IDENT_4 . driver . core . IDENT_5 session = mock ( com . IDENT_4 . driver . core . IDENT_5 . class ) ; final org . apache . IDENT_0 . persistence . model . entity . Entity entity = org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . IDENT_8 . METHOD_4 ( ) ; entity . METHOD_5 ( new org . apache . IDENT_0 . persistence . model . field . METHOD_6 ( "name" , STRING_1 , true ) ) ; entity . METHOD_5 ( new org . apache . IDENT_0 . persistence . model . field . METHOD_6 ( STRING_2 , STRING_3 , true ) ) ; java . util . List < org . apache . IDENT_0 . persistence . collection . IDENT_9 > IDENT_10 = new java . util . ArrayList < org . apache . IDENT_0 . persistence . collection . IDENT_9 > ( ) ; IDENT_10 . add ( new org . apache . IDENT_0 . persistence . collection . IDENT_6 . entity . impl . METHOD_7 ( entity . getId ( ) , org . apache . IDENT_0 . persistence . model . util . IDENT_3 . METHOD_3 ( ) , org . apache . IDENT_0 . persistence . collection . IDENT_6 . entity . IDENT_11 . IDENT_12 , IDENT_9 . IDENT_13 . IDENT_14 ) ) ; IDENT_10 . add ( new org . apache . IDENT_0 . persistence . collection . IDENT_6 . entity . impl . METHOD_7 ( entity . getId ( ) , org . apache . IDENT_0 . persistence . model . util . IDENT_3 . METHOD_3 ( ) , org . apache . IDENT_0 . persistence . collection . IDENT_6 . entity . IDENT_11 . IDENT_12 , IDENT_9 . IDENT_13 . IDENT_14 ) ) ; org . apache . IDENT_0 . persistence . collection . serialization . IDENT_15 IDENT_16 = mock ( org . apache . IDENT_0 . persistence . collection . serialization . IDENT_15 . class ) ; when ( IDENT_16 . load ( IDENT_1 , entity . getId ( ) , entity . METHOD_8 ( ) , 2 ) ) . thenReturn ( IDENT_10 ) ; org . apache . IDENT_0 . persistence . collection . serialization . IDENT_17 IDENT_18 = mock ( org . apache . IDENT_0 . persistence . collection . serialization . IDENT_17 . class ) ; org . apache . IDENT_0 . persistence . collection . serialization . IDENT_19 IDENT_20 = new org . apache . IDENT_0 . persistence . collection . serialization . impl . METHOD_9 ( entity . METHOD_10 ( "name" ) , entity . getId ( ) , entity . METHOD_8 ( ) ) ; org . apache . IDENT_0 . persistence . collection . serialization . IDENT_19 IDENT_21 = new org . apache . IDENT_0 . persistence . collection . serialization . impl . METHOD_9 ( entity . METHOD_10 ( STRING_2 ) , entity . getId ( ) , entity . METHOD_8 ( ) ) ; final org . apache . IDENT_0 . persistence . collection . IDENT_22 IDENT_23 = org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . IDENT_8 . METHOD_11 ( entity ) ; boolean IDENT_24 = false ; org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . write . IDENT_25 IDENT_26 = new org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . write . METHOD_12 ( IDENT_16 ) ; org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . write . IDENT_27 IDENT_28 = new org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . write . METHOD_13 ( IDENT_16 , IDENT_18 , session ) ; try { IDENT_26 . call ( new org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . METHOD_14 ( IDENT_1 , IDENT_23 ) ) ; } catch ( org . apache . IDENT_0 . persistence . collection . exception . IDENT_29 e ) { org . apache . IDENT_0 . persistence . collection . IDENT_6 . IDENT_7 . write . IDENT_30 . logger . info ( STRING_4 , e ) ; IDENT_24 = true ; IDENT_28 . call ( e ) ; } "<AssertPlaceHolder>" ; verify ( IDENT_18 , times ( 1 ) ) . METHOD_15 ( IDENT_1 , IDENT_20 ) ; verify ( IDENT_18 , times ( 1 ) ) . METHOD_15 ( IDENT_1 , IDENT_21 ) ; } call ( org . apache . IDENT_0 . services . IDENT_31 . Entity ) { boolean IDENT_32 = false ; try { if ( ! ( user . METHOD_16 ( ) . equals ( IDENT_33 . METHOD_16 ( ) ) ) ) { org . apache . IDENT_0 . services . IDENT_31 . IDENT_34 IDENT_35 = em . METHOD_17 ( user , STRING_5 , null , 100 , Query . IDENT_36 . IDENT_37 , false ) ; java . util . List < org . apache . IDENT_0 . services . IDENT_31 . Entity > IDENT_38 = IDENT_35 . METHOD_18 ( ) ; for ( org . apache . IDENT_0 . services . IDENT_31 . IDENT_39 IDENT_40 : IDENT_38 ) { if ( IDENT_40 . METHOD_16 ( ) . equals ( IDENT_41 . METHOD_16 ( ) ) ) { em . METHOD_19 ( user , STRING_5 , IDENT_40 ) ; } } em . METHOD_19 ( IDENT_41 , STRING_6 , user ) ; IDENT_32 = true ; } } catch ( java . lang . Exception e ) { org . apache . IDENT_0 . services . IDENT_31 . IDENT_42 . logger . error ( ( STRING_7 + ( user . toString ( ) ) ) , e ) ; } return IDENT_32 ; }
org . junit . Assert . assertTrue ( IDENT_24 )