public void testDeregisterFactory() throws Exception {
WorkContext workContext = new WorkContextImpl();
ScopeRegistry scopeRegistry = new ScopeRegistryImpl(workContext);
RequestScopeObjectFactory factory = new RequestScopeObjectFactory();
scopeRegistry.registerFactory(Scope.REQUEST, factory);
scopeRegistry.deregisterFactory(Scope.REQUEST);
try {
scopeRegistry.getScopeContainer(Scope.REQUEST);
fail();
} catch (ScopeNotFoundException e) {
// expected