@Test
public void testContextDestroyedWithSessionManager() {

  when(context.getAttribute(Attributes.SESSION_MANAGER)).thenReturn(manager);
  ServletContextEvent event = new ServletContextEvent(context);
  listener.contextDestroyed(event);
  verify(manager).close();
}