METHOD_0 ( ) { org . slc . sli . dal . convert . IDENT_0 IDENT_1 = org . mockito . Mockito . METHOD_1 ( IDENT_2 ) ; org . slc . sli . dal . convert . Map < java . lang . String , java . lang . Object > IDENT_3 = new org . slc . sli . dal . convert . HashMap < java . lang . String , java . lang . Object > ( ) ; IDENT_3 . put ( STRING_0 , STRING_1 ) ; com . mongodb . IDENT_4 IDENT_5 = com . mongodb . IDENT_6 . start ( ) . METHOD_2 ( STRING_2 ) . add ( STRING_3 , IDENT_3 ) . get ( ) ; com . mongodb . IDENT_4 IDENT_7 = METHOD_3 ( STRING_4 ) ; org . slc . sli . validation . schema . IDENT_8 IDENT_9 = METHOD_4 ( ) ; when ( IDENT_10 . METHOD_5 ( org . slc . sli . dal . convert . IDENT_11 . IDENT_12 ) ) . thenReturn ( IDENT_13 ) ; when ( IDENT_13 . METHOD_6 ( org . mockito . Mockito . any ( com . mongodb . IDENT_4 . class ) , ( ( com . mongodb . IDENT_4 ) ( org . mockito . Mockito . METHOD_7 ( ) ) ) , ( ( com . mongodb . IDENT_4 ) ( org . mockito . Mockito . METHOD_7 ( ) ) ) , org . mockito . Mockito . eq ( false ) , org . mockito . Mockito . eq ( IDENT_5 ) , org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . eq ( false ) ) ) . thenReturn ( IDENT_7 ) ; when ( IDENT_14 . METHOD_8 ( IDENT_15 . IDENT_12 ) ) . thenReturn ( IDENT_9 ) ; boolean result = IDENT_1 . METHOD_9 ( entity ) ; org . mockito . Mockito . verify ( IDENT_13 , org . mockito . Mockito . times ( 1 ) ) . METHOD_6 ( org . mockito . Mockito . any ( com . mongodb . IDENT_4 . class ) , ( ( com . mongodb . IDENT_4 ) ( org . mockito . Mockito . METHOD_7 ( ) ) ) , ( ( com . mongodb . IDENT_4 ) ( org . mockito . Mockito . METHOD_7 ( ) ) ) , org . mockito . Mockito . eq ( false ) , org . mockito . Mockito . eq ( IDENT_5 ) , org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . eq ( false ) ) ; "<AssertPlaceHolder>" ; } verify ( java . lang . String , org . apache . commons . lang3 . tuple . IDENT_16 ) { org . slc . sli . domain . IDENT_17 IDENT_18 = new org . slc . sli . domain . METHOD_10 ( ) ; IDENT_18 . METHOD_11 ( new org . slc . sli . domain . METHOD_12 ( STRING_5 , STRING_6 1 , code ) ) ; org . slc . sli . domain . Entity session = repo . METHOD_13 ( org . slc . sli . api . security . IDENT_19 . IDENT_20 , IDENT_18 ) ; if ( session == null ) { org . slc . sli . api . security . IDENT_19 . LOG . error ( STRING_7 1 , code ) ; throw new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_23 , java . lang . String . format ( STRING_7 1 , code ) ) ; } java . util . List < java . util . Map < java . lang . String , java . lang . Object > > IDENT_24 = ( ( java . util . List < java . util . Map < java . lang . String , java . lang . Object > > ) ( session . METHOD_15 ( ) . get ( STRING_8 ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > IDENT_25 = null ; for ( java . util . Map < java . lang . String , java . lang . Object > IDENT_26 : IDENT_24 ) { java . util . Map < java . lang . String , java . lang . Object > IDENT_27 = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( IDENT_26 . get ( STRING_6 2 ) ) ) ; if ( IDENT_27 . get ( "value" ) . equals ( code ) ) { IDENT_25 = IDENT_26 ; break ; } } if ( IDENT_25 == null ) { org . slc . sli . api . security . IDENT_19 . LOG . error ( STRING_7 6 , code ) ; throw new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_23 , java . lang . String . format ( STRING_7 6 , code ) ) ; } java . lang . String IDENT_28 = ( ( java . lang . String ) ( IDENT_25 . get ( STRING_6 0 ) ) ) ; if ( ! ( IDENT_29 . METHOD_16 ( ) . equals ( IDENT_28 ) ) ) { org . slc . sli . api . security . IDENT_19 . LOG . error ( STRING_9 , IDENT_29 . METHOD_16 ( ) , code ) ; throw new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_30 , java . lang . String . format ( STRING_9 , IDENT_29 . METHOD_16 ( ) , code ) ) ; } java . lang . String IDENT_31 = ( ( java . lang . String ) ( IDENT_25 . get ( STRING_7 7 ) ) ) ; if ( java . lang . Boolean . valueOf ( IDENT_31 ) ) { org . slc . sli . api . security . IDENT_19 . LOG . error ( STRING_7 , code ) ; throw new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_23 , java . lang . String . format ( STRING_7 , code ) ) ; } java . lang . Long IDENT_32 = ( ( java . lang . Long ) ( ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( IDENT_25 . get ( STRING_6 2 ) ) ) . get ( STRING_7 3 ) ) ) ; if ( IDENT_32 < ( java . lang . System . currentTimeMillis ( ) ) ) { org . slc . sli . api . security . IDENT_19 . LOG . error ( STRING_10 , code ) ; throw new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_23 , java . lang . String . format ( STRING_10 , code ) ) ; } IDENT_18 = new org . slc . sli . domain . METHOD_10 ( ) ; IDENT_18 . METHOD_11 ( new org . slc . sli . domain . METHOD_12 ( STRING_6 3 , STRING_6 1 , IDENT_29 . METHOD_16 ( ) ) ) ; IDENT_18 . METHOD_11 ( new org . slc . sli . domain . METHOD_12 ( STRING_7 8 , STRING_6 1 , IDENT_29 . METHOD_17 ( ) ) ) ; org . slc . sli . domain . Entity app = repo . METHOD_13 ( org . slc . sli . api . security . IDENT_19 . IDENT_33 , IDENT_18 ) ; if ( app == null ) { org . slc . sli . api . security . IDENT_21 . METHOD_14 x = new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_34 , STRING_7 0 ) ; org . slc . sli . api . security . IDENT_19 . LOG . error ( STRING_11 , x ) ; throw x ; } org . slc . sli . api . security . IDENT_35 IDENT_36 = IDENT_37 . METHOD_18 ( session . METHOD_15 ( ) . get ( STRING_12 ) , org . slc . sli . api . security . IDENT_35 . class ) ; if ( ( IDENT_36 . METHOD_19 ( ) ) == null ) { IDENT_36 . METHOD_20 ( IDENT_15 . IDENT_38 ) ; } IDENT_36 . METHOD_21 ( IDENT_39 . METHOD_22 ( IDENT_36 . METHOD_23 ( ) , IDENT_36 . METHOD_24 ( ) , IDENT_36 . METHOD_19 ( ) ) . METHOD_25 ( ) ) ; org . slc . sli . common . util . IDENT_40 . IDENT_41 . METHOD_26 ( IDENT_36 . METHOD_23 ( ) ) ; if ( ! ( IDENT_42 . METHOD_27 ( app , IDENT_36 ) ) ) { java . lang . String message = ( ( STRING_6 + ( IDENT_36 . METHOD_24 ( ) ) ) + STRING_6 4 ) + ( app . METHOD_15 ( ) . get ( STRING_7 9 ) ) ; org . slc . sli . api . security . IDENT_19 . LOG . error ( message ) ; throw new org . slc . sli . api . security . IDENT_21 . METHOD_14 ( org . slc . sli . api . security . IDENT_21 . METHOD_14 . IDENT_22 . IDENT_34 , message , ( ( java . lang . String ) ( session . METHOD_15 ( ) . get ( STRING_7 2 ) ) ) ) ; } java . lang . String token = "" ; token = ( ( java . lang . String ) ( IDENT_25 . get ( STRING_7 5 ) ) ) ; IDENT_25 . put ( STRING_7 7 , STRING_7 4 ) ; repo . update ( org . slc . sli . api . security . IDENT_19 . IDENT_20 , session , false ) ; return token ; }
org . junit . Assert . assertTrue ( result )