RequestContextHolder.getRequestAttributes().registerDestructionCallback(
"test", runnable, RequestAttributes.SCOPE_REQUEST);
listener.requestDestroyed(new ServletRequestEvent(context, request));
assertNull(RequestContextHolder.getRequestAttributes());
assertTrue(runnable.wasExecuted());
}
public void testRequestContextListenerWithSameThreadAndAttributesGone() {
RequestContextListener listener = new RequestContextListener();
MockServletContext context = new MockServletContext();