private String getJsonConfig(List<String> pluginRepositories, String pluginsDir) {

        //Minimal configuration to create a fake engine. Include "plugin-registry" to test.
        String jsonStr = "{\n" +
                "   \"registry\":{\n" +
                "      \"class\":\"io.apiman.gateway.engine.impl.InMemoryRegistry\",\n" +
                "      \"config\":{\n" +
                "      }\n" +
                "   },\n" +
                "   \"plugin-registry\":{\n" +
                "      \"class\":\"io.apiman.gateway.platforms.vertx3.engine.VertxPluginRegistry\",\n" +
                "      \"config\":{\n" +
                (pluginRepositories != null && pluginRepositories.size() > 0 ?
                        "         \"pluginRepositories\":\n" +
                                "            " + new JsonArray(pluginRepositories).encode() + "\n" : "") +
                ((pluginRepositories != null && pluginRepositories.size() > 0) && StringUtils.isNotEmpty(pluginsDir) ?
                        "         ,\n" : "") +
                (StringUtils.isNotEmpty(pluginsDir) ?
                        "         \"pluginsDir\":\"" + pluginsDir + "\"\n" : "") +
                "      }\n" +
                "   },\n" +
                "   \"metrics\":{\n" +
                "      \"class\":\"io.apiman.gateway.engine.impl.InMemoryMetrics\",\n" +
                "      \"config\":{\n" +
                "      }\n" +
                "   }\n" +
                "}";

        return jsonStr;
    }
Get Vert.X JSON Configuration file, with customized pluginRepositories and pluginsDir

@param pluginRepositories
@param pluginsDir
@return
gateway/platforms/vertx3/vertx3/src/test/java/io/apiman/gateway/platforms/vertx3/engine/VertxPluginRegistryTest.java