private static Properties loadConfigFile(String configFile) {
        // Try loading as a URL first.
        try {
            URL url = new URL(configFile);
            try (InputStream is = url.openStream()) {
                Properties props = new Properties();
                props.load(is);
                return props;
            }
        } catch (IOException e) {
            // Move on to the next type.
            System.out.println("Tried to load config file as a URL but failed: " + configFile);
        }

        // Now try loading as a resource.
        ClassLoader cl = ServletGatewayTestServer.class.getClassLoader();
        URL resource = cl.getResource(configFile);
        if (resource == null) {
            resource = cl.getResource("test-configs/" + configFile);
        }
        try {
            try (InputStream is = resource.openStream()) {
                Properties props = new Properties();
                props.load(is);
                return props;
            }
        } catch (Exception e) {
            // Move on to the next type.
            System.out.println("Tried to load config file as a resource but failed: " + configFile);
        }

        throw new RuntimeException("Failed to load referenced config: " + configFile);
    }
Loads the config file.
@param configFile
gateway/test/src/test/java/io/apiman/gateway/test/junit/servlet/ServletGatewayTestServer.java