protected static void configureGateway(JsonNode config) {
        Map<String, String> props = new HashMap<>();

        // Global settings - all tests share but can override
        props.put(GatewayConfigProperties.PLUGIN_REGISTRY_CLASS, DefaultPluginRegistry.class.getName());
        props.put(GatewayConfigProperties.PLUGIN_REGISTRY_CLASS + ".pluginsDir", new File("target/plugintmp").getAbsolutePath());
        props.put(GatewayConfigProperties.CONNECTOR_FACTORY_CLASS, HttpConnectorFactory.class.getName());
        props.put(GatewayConfigProperties.POLICY_FACTORY_CLASS, PolicyFactoryImpl.class.getName());
        props.put(GatewayConfigProperties.COMPONENT_PREFIX + IPolicyFailureFactoryComponent.class.getSimpleName(), PolicyFailureFactoryComponent.class.getName());
        props.put(GatewayConfigProperties.COMPONENT_PREFIX + IHttpClientComponent.class.getSimpleName(), HttpClientComponentImpl.class.getName());
        props.put(GatewayConfigProperties.COMPONENT_PREFIX + IBufferFactoryComponent.class.getSimpleName(), ByteBufferFactoryComponent.class.getName());
        props.put(GatewayConfigProperties.METRICS_CLASS, TestMetrics.class.getName());

        // First, process the config files.
        if (config.has("config-files")) {
            JsonNode configFilesNode = config.get("config-files");
            for (JsonNode jsonNode : configFilesNode) {
                String configFile = jsonNode.asText();
                Properties loadedProps = loadConfigFile(configFile);
                for (Entry<Object, Object> entry : loadedProps.entrySet()) {
                    props.put(entry.getKey().toString(), entry.getValue().toString());
                }
            }
        }

        // Then layer on top of that, the properties defined in the config itself.
        if (config.has("config-properties")) {
            JsonNode configNode = config.get("config-properties");
            Iterator<String> fieldNames = configNode.fieldNames();
            while (fieldNames.hasNext()) {
                String fieldName = fieldNames.next();
                String value = configNode.get(fieldName).asText();
                props.put(fieldName, value);
            }
        }

        for (Entry<String, String> entry : props.entrySet()) {
            TestUtil.setProperty(entry.getKey(), entry.getValue());
        }
    }
Configures the gateway by settings system properties.
gateway/test/src/test/java/io/apiman/gateway/test/junit/servlet/ServletGatewayTestServer.java