Lifecycle.beginCall();
MockIdentity midentity = new MockIdentity();
RoleBasedPermissionResolver resolver = new RoleBasedPermissionResolver();
resolver.setEnableRoleBasedAuthorization( false );
midentity.addPermissionResolver( resolver );
midentity.create();
Contexts.getSessionContext().set( "org.jboss.seam.security.identity",
midentity );
Contexts.getSessionContext().set( "org.drools.guvnor.client.rpc.RepositoryService",
impl );