Context.unset();
Context.set(Context.webContext(request, response, Mockito.mock(FilterConfig.class)), config);
// create a groupExtractor which always return the same group name.
final String groupName = "group";
final GroupExtractor groupExtractor = new DefaultGroupExtractor() {
@Override
public String getGroupName(final HttpServletRequest request) {
return groupName;
}