    @Test
    @Issue("JENKINS-39414")
    public void shouldProperlyHandleFunctionsInRubyModules() throws Exception {

        final ScriptingContainer ruby = createRubyInstance();
        final RubyKlassNavigator navigator = new RubyKlassNavigator(ruby.getProvider().getRuntime(), ClassLoader.getSystemClassLoader());
        final MyRubyModule myModule = new MyRubyModule(ruby.getRuntime(), new MyRubyClass(ruby.getRuntime()), true);


        final Klass<RubyModule> classInstance = new Klass<RubyModule>(myModule, navigator);
        
        final List<Function> declaredFunctions = classInstance.getFunctions();
        for (Function ref : declaredFunctions) {
            if ("doDynamic".equals(ref.getName())) {
                //TODO: check fields once implemented in Stapler
                return;
            }
        }
        
        assumeThat("Routing of declared routable methods is not fully implemented (See https://github.com/stapler/stapler/issues/87)", 
                ruby, not(anything("Nothing to do in this code")));
        Assert.fail("Have not found 'doDynamic' in the returned function list");
    }