void registerSessionIfNeeded(HttpSession session) {
		if (session != null) {
			synchronized (session) {
				if (!SESSION_MAP_BY_ID.containsKey(session.getId())) {
					sessionCreated(new HttpSessionEvent(session));
				}
			}
		}
	}
@Test
	public void registerSessionIfNeeded() {
		final HttpSession session = createSession();
		sessionListener.registerSessionIfNeeded(session);
		sessionListener.registerSessionIfNeeded(session);
		sessionListener.registerSessionIfNeeded(null);

		sessionListener.unregisterInvalidatedSessions();

		sessionListener.unregisterSessionIfNeeded(session);
		sessionListener.unregisterSessionIfNeeded(session);
		sessionListener.unregisterSessionIfNeeded(null);
	}