TestServletConfig config = new TestServletConfig("test", params);
ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
ServletContext context = config.getServletContext();
ControlModuleGroup group = ControlModuleGroup.getInstance(context);
ControlModuleContext module = new ControlModuleContext(config, mapping, null);
assertTrue(group.isEmpty());
group.add(module);
assertFalse(group.isEmpty());
assertSame(module, group.getControlModuleContext("test"));
TestRequest request = new TestRequest(new TestSession(module.getServletContext()));
group.setControlModuleContext(request, module);
assertSame(module, ModuleSupport.getInstance(context).getModuleContext(request));
group.remove(module);
assertTrue(group.isEmpty());
}