private WebClient handleSourceConfiguration(Boolean shareBrowser, WebClient webClient,
            SourceConfiguration sourceConfiguration) throws ConfigurationException {
        BrowserVersion browserVersion;
        Boolean javaScriptEnabled;
        String sourceName = sourceConfiguration.getSourceName();
        checkObjectAvailability(sourceName, "exception.configuration.missing.source");
        browserVersion = sourceConfiguration.getBrowserVersion();
        javaScriptEnabled = sourceConfiguration.getJavaScriptEnabled();
        if (shareBrowser) {
            if (browserVersion != null) {
                throw new RuntimeException(
                        "Browser version for specific source is not allowed in 'Share Browser' mode.");
            }
            if (javaScriptEnabled != null) {
                throw new RuntimeException(
                        "Enable JavaScript option should not be specified when browser is not shared.");
            }

        } else {
            webClient = initWebClient(browserVersion, javaScriptEnabled);
        }
        if (acceptor.getWebClients().put(sourceName, webClient) != null) {
            throw new RuntimeException("Two sources with identical names are not allowed.");
        }
        SourceDefinition sourceDefinition = new SourceDefinition();
        sourceDefinition.setHomePageURI(sourceConfiguration.getHomePageURI());
        checkObjectAvailability(sourceDefinition.getHomePageURI(),
                "exception.configuration.missing.homepageuri", sourceName);
        sourceDefinition.setSourceHandler(getSourceHandler(sourceName,
                sourceConfiguration.getSourceHandlerClass()));
        acceptor.getSources().put(sourceName, sourceDefinition);
        return webClient;
    }