private static ModuleInfo getModuleInfo(final List<String> moduleClassNames,
                                            final Map<String, ModuleInfo> allModuleInfoMap) {
        if (NullSafe.isEmptyCollection(moduleClassNames)) {
            throw new RuntimeException(LogUtil.message("Empty list"));
        }

        final String owningModuleClassName = moduleClassNames.get(0);

        if (moduleClassNames.size() == 1) {
            // root module
            return allModuleInfoMap.computeIfAbsent(
                    owningModuleClassName,
                    className -> new ModuleInfo(className, null));
        } else {
            // recurse
            final List<String> parentClassNames = moduleClassNames.subList(1, moduleClassNames.size());
            final ModuleInfo parentModuleInfo = getModuleInfo(parentClassNames, allModuleInfoMap);
            final ModuleInfo owningModuleInfo = allModuleInfoMap.computeIfAbsent(
                    owningModuleClassName,
                    k -> new ModuleInfo(k, parentModuleInfo));
            // Add the child to the parent
            parentModuleInfo.addChildModule(owningModuleInfo);
            return owningModuleInfo;
        }
    }
Create a {@link MockBinderBuilder} to bind multiple interfaces to a {@link Mockito} mock.
stroom-test-common/src/main/java/stroom/test/common/util/guice/GuiceTestUtil.java