METHOD_0 ( ) { final java . util . Set < com . IDENT_0 . IDENT_1 . manager . domain . IDENT_2 > IDENT_3 = com . google . common . collect . IDENT_4 . METHOD_1 ( ) ; IDENT_3 . add ( com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_6 ) ; doReturn ( IDENT_3 ) . when ( com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_7 ) . search ( anyString ( ) , anyString ( ) , METHOD_2 ( ) ) ; doReturn ( com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_8 ) . when ( com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_7 ) . save ( any ( com . IDENT_0 . IDENT_1 . manager . domain . IDENT_2 . class ) ) ; final com . IDENT_0 . IDENT_1 . manager . domain . IDENT_2 result = com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_9 . METHOD_3 ( com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_10 , com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_8 ) ; "<AssertPlaceHolder>" ; } METHOD_3 ( java . lang . String , com . IDENT_0 . IDENT_1 . manager . domain . IDENT_2 ) { final java . util . Set < com . IDENT_0 . IDENT_1 . manager . domain . IDENT_2 > IDENT_11 = IDENT_7 . search ( IDENT_10 , IDENT_6 . getName ( ) , null ) ; int IDENT_12 = 0 ; for ( final com . IDENT_0 . IDENT_1 . manager . domain . IDENT_2 c : IDENT_11 ) { if ( ( c . METHOD_4 ( ) ) > IDENT_12 ) { IDENT_12 = c . METHOD_4 ( ) ; } } if ( IDENT_12 > 0 ) { IDENT_6 . METHOD_5 ( ( IDENT_12 + 1 ) ) ; } IDENT_6 . METHOD_6 ( IDENT_10 ) ; com . IDENT_0 . IDENT_1 . manager . utils . IDENT_13 . METHOD_7 ( IDENT_6 ) ; IDENT_6 . METHOD_8 ( ) . METHOD_9 ( ( IDENT_14 ) -> { IDENT_14 . METHOD_10 ( IDENT_15 . read ( IDENT_14 . METHOD_11 ( ) ) ) ; IDENT_14 . METHOD_12 ( IDENT_16 . IDENT_17 ) ; } ) ; IDENT_6 . METHOD_13 ( ) . METHOD_9 ( ( IDENT_14 ) -> { IDENT_14 . METHOD_10 ( IDENT_15 . read ( IDENT_14 . METHOD_11 ( ) ) ) ; IDENT_14 . METHOD_12 ( IDENT_16 . IDENT_18 ) ; } ) ; return IDENT_7 . save ( IDENT_6 ) ; }
org . junit . Assert . assertEquals ( result , com . IDENT_0 . IDENT_1 . manager . service . IDENT_5 . IDENT_8 )