METHOD_0 ( ) { io . IDENT_0 . server . IDENT_1 IDENT_2 = new io . IDENT_0 . server . METHOD_1 ( null ) ; org . wildfly . IDENT_3 . IDENT_4 . IDENT_5 < org . wildfly . IDENT_3 . IDENT_4 . IDENT_6 > IDENT_7 = mock ( org . wildfly . IDENT_3 . IDENT_4 . IDENT_5 . class ) ; org . wildfly . IDENT_3 . IDENT_4 . IDENT_6 batch = mock ( org . wildfly . IDENT_3 . IDENT_4 . IDENT_6 . class ) ; io . IDENT_0 . server . session . IDENT_8 config = mock ( io . IDENT_0 . server . session . IDENT_8 . class ) ; java . lang . String IDENT_9 = STRING_0 ; when ( config . METHOD_2 ( IDENT_2 ) ) . thenReturn ( IDENT_9 ) ; when ( this . manager . METHOD_3 ( IDENT_9 ) ) . thenReturn ( null ) ; when ( this . manager . METHOD_4 ( ) ) . thenReturn ( IDENT_7 ) ; when ( IDENT_7 . METHOD_5 ( ) ) . thenReturn ( batch ) ; io . IDENT_0 . server . session . IDENT_10 IDENT_11 = this . adapter . METHOD_6 ( IDENT_2 , config ) ; "<AssertPlaceHolder>" ; verify ( batch ) . close ( ) ; verify ( IDENT_7 , METHOD_7 ( ) ) . METHOD_8 ( ) ; } METHOD_6 ( io . IDENT_0 . server . METHOD_1 , io . IDENT_0 . server . session . IDENT_8 ) { if ( IDENT_2 != null ) { io . IDENT_0 . server . session . IDENT_10 IDENT_12 = IDENT_2 . METHOD_9 ( this . key ) ; if ( IDENT_12 != null ) { return IDENT_12 ; } } if ( config == null ) { throw IDENT_13 . IDENT_14 . METHOD_10 ( ) ; } java . lang . String id = config . METHOD_2 ( IDENT_2 ) ; if ( id == null ) { return null ; } if ( ! ( org . wildfly . IDENT_3 . web . IDENT_0 . session . IDENT_15 . IDENT_16 . validate ( id ) ) ) { return null ; } boolean close = true ; java . util . function . IDENT_17 < io . IDENT_0 . server . METHOD_1 > IDENT_18 = this . METHOD_11 ( ) ; try { org . wildfly . IDENT_3 . IDENT_4 . IDENT_5 < org . wildfly . IDENT_3 . IDENT_4 . IDENT_6 > IDENT_7 = this . manager . METHOD_4 ( ) ; org . wildfly . IDENT_3 . IDENT_4 . IDENT_6 batch = IDENT_7 . METHOD_5 ( ) ; try { org . wildfly . IDENT_3 . web . session . IDENT_10 < org . wildfly . IDENT_3 . web . IDENT_0 . session . IDENT_19 > session = this . manager . METHOD_3 ( id ) ; if ( session == null ) { return null ; } io . IDENT_0 . server . session . IDENT_10 result = new org . wildfly . IDENT_3 . web . IDENT_0 . session . METHOD_12 ( this , session , config , IDENT_7 . METHOD_8 ( ) , IDENT_18 ) ; if ( IDENT_2 != null ) { IDENT_2 . METHOD_13 ( this . key , result ) ; } close = false ; return result ; } catch ( java . lang . RuntimeException | java . lang . IDENT_20 e ) { batch . METHOD_14 ( ) ; throw e ; } finally { if ( close ) { batch . close ( ) ; } } } finally { if ( close ) { IDENT_18 . accept ( IDENT_2 ) ; } } }
org . junit . Assert . assertNull ( IDENT_11 )