@Test
    public void testModularityMapping() {
        mapping.setBasePackage("net.sf.cocmvc.controllers");

        final Class handlerType = ModuleOneController.class;
        doWithMethods(handlerType, new MethodCallback() {
            public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
                String methodName = method.getName();

                if ("index".equals(methodName)) {
                    assertMappingPatterns(handlerType, method, "/module1/moduleOne");
                } else if ("fooBar".equals(methodName)) {
                    assertMappingPatterns(handlerType, method, "/module1/moduleOne/fooBar");
                }
            }
        });

        final Class subModuleHandlerType = ModuleOneOneController.class;
        doWithMethods(handlerType, new MethodCallback() {
            public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
                String methodName = method.getName();

                if ("index".equals(methodName)) {
                    assertMappingPatterns(subModuleHandlerType, method, "/module1/module11/moduleOneOne");
                }
                else if ("fooBar".equals(methodName)) {
                    assertMappingPatterns(subModuleHandlerType, method, "/module1/module11/moduleOneOne/fooBar");
                }
            }
        });

        final Class topLevelHandlerType = TestPlainController.class;
        doWithMethods(handlerType, new MethodCallback() {
            public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
                String methodName = method.getName();

                if ("index".equals(methodName)) {
                    assertMappingPatterns(topLevelHandlerType, method, "/testPlain");
                }
                else if ("list".equals(methodName)) {
                    assertMappingPatterns(topLevelHandlerType, method, "/testPlain/list");
                }
            }
        });
    }