@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		if (!(request instanceof HttpServletRequest)) {
			super.doFilter(request, response, chain);
			return;
		}
		final HttpServletRequest httpRequest = (HttpServletRequest) request;

		registerSessionIfNeeded(httpRequest);
		super.doFilter(request, response, chain);
		// si logout on prend en compte de suite la destruction de la session
		unregisterSessionIfNeeded(httpRequest);
	}
@Test
	public void testNoHttp() throws IOException, ServletException {
		final ServletRequest request = createNiceMock(ServletRequest.class);
		final ServletResponse response = createNiceMock(ServletResponse.class);
		final FilterChain chain = createNiceMock(FilterChain.class);
		replay(request);
		replay(response);
		replay(chain);
		pluginMonitoringFilter.doFilter(request, response, chain);
		verify(request);
		verify(response);
		verify(chain);
	}