public class EnsureRequestScopeThreadLocalIsCleanUpTest {
@Test
public void runAndCheckThreadLocal() throws Exception {
final ApplicationComposers composers = new ApplicationComposers(EnsureRequestScopeThreadLocalIsCleanUpTest.class);
composers.before(this);
final CdiAppContextsService contextsService = CdiAppContextsService.class.cast(WebBeansContext.currentInstance().getService(ContextsService.class));
assertNotNull(contextsService.getCurrentContext(RequestScoped.class));
assertNotNull(contextsService.getCurrentContext(SessionScoped.class));
composers.after();
assertNull(contextsService.getCurrentContext(RequestScoped.class));