);
Lifecycle.beginRequest( externalContext );
Contexts.getSessionContext().set( "foo", new Foo() );
RemoveInterceptor ri = new RemoveInterceptor();
ri.setComponent( new Component(Foo.class, appContext) );
ri.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
return InterceptorTest.getMethod("foo");
}
} );
assert Contexts.getSessionContext().isSet("foo");
ri.aroundInvoke( new MockInvocationContext() {
@Override
public Method getMethod()
{
return InterceptorTest.getMethod("destroy");
}