public static void createCollection(String hostname, int port, String collectionName, String configurationName)
        throws URISyntaxException, IOException {
        Map<String, String> parameters = new HashMap<>();
        parameters.put("action", "CREATE");
        parameters.put("name", collectionName);
        parameters.put("numShards", "1");
        parameters.put("replicationFactor", "1");
        parameters.put("wt", "json");
        if (configurationName != null) {
            parameters.put("collection.configName", configurationName);
        }
        HttpUrl url = generateSolrURL(hostname, port, Arrays.asList("admin", "collections"), parameters);
        executePost(url, null);
    }
Creates a new collection

@param hostname          the Hostname under which solr is reachable
@param port              The Port on which solr is running
@param collectionName    the name of the collection which should be created
@param configurationName the name of the configuration which should used to create the collection
                         or null if the default configuration should be used
modules/solr/src/main/java/org/testcontainers/containers/SolrClientUtils.java