Map<String, String[]> requestParams = new HashMap<String, String[]>();
requestParams.put("flip.featureName", new String[]{"enabled"});
when(request.getParameterMap()).thenReturn(requestParams);
FeatureDescriptorsMap sessionFeatureMap = new FeatureDescriptorsMap();
when(session.getAttribute(FlipOverrideFilter.SESSION_FEATURES_KEY)).thenReturn(sessionFeatureMap);
filter.doFilter(request, response, filterChain);
FeatureDescriptor featureDescriptor = sessionFeatureMap.get("featureName");
assertEquals("featureName", featureDescriptor.getName());
assertEquals(FeatureState.ENABLED, featureDescriptor.getState());
}