METHOD_0 ( ) { org . eclipse . IDENT_0 . core . server . resources . IDENT_1 resource = new org . eclipse . IDENT_0 . core . METHOD_1 ( "test" ) ; org . osgi . framework . IDENT_2 < org . eclipse . IDENT_0 . core . server . resources . IDENT_1 > ref = mock ( org . osgi . framework . IDENT_2 . class ) ; when ( IDENT_3 . METHOD_2 ( ref ) ) . thenReturn ( resource ) ; IDENT_4 . METHOD_3 ( null ) ; org . eclipse . IDENT_0 . core . server . resources . IDENT_1 IDENT_5 = IDENT_4 . METHOD_4 ( ref ) ; "<AssertPlaceHolder>" ; verify ( server ) . add ( resource ) ; } METHOD_4 ( org . osgi . framework . IDENT_2 ) { org . eclipse . IDENT_0 . core . server . resources . IDENT_1 resource = context . METHOD_2 ( reference ) ; org . eclipse . IDENT_0 . osgi . IDENT_6 . LOGGER . METHOD_5 ( java . lang . String . format ( STRING_0 , resource . getName ( ) ) ) ; if ( resource != null ) { IDENT_4 . add ( resource ) ; } return resource ; }
org . junit . Assert . assertEquals ( resource , IDENT_5 )