FirefoxDriverFactory extends WebDriverFactory { @Override public WebDriver newInstance(DriverOptions driverOptions) { GeckoDriverService service = setupBuilder(new GeckoDriverService.Builder(), driverOptions, GECKODRIVER).build(); FirefoxOptions firefoxOptions = newFirefoxOptions(driverOptions); String firefoxBin = getFirefoxBinary(driverOptions); if (firefoxBin != null) firefoxOptions.setBinary(firefoxBin); if (driverOptions.has(CLI_ARGS)) firefoxOptions.addArguments(driverOptions.getCliArgs()); FirefoxProfile profile = getFirefoxProfile(driverOptions); if (profile != null) firefoxOptions.setProfile(profile); firefoxOptions.merge(driverOptions.getCapabilities()); FirefoxDriver driver = new FirefoxDriver(service, firefoxOptions); setInitialWindowSize(driver, driverOptions); return driver; }  @Override String getBrowserName(); static FirefoxOptions newFirefoxOptions(DriverOptions driverOptions); @Override WebDriver newInstance(DriverOptions driverOptions); static void setDriverSpecificCapabilitiesForRemoteWebDriver(DesiredCapabilities caps, DriverOptions driverOptions); @SuppressWarnings("javadoc")
    static final String BROWSER_NAME; }
@Test(expected = IllegalStateException.class) public void firefoxNotFoundIn_webdriver_firefox_bin() throws IOException, IllegalArgumentException { try { new FirefoxDriverFactory().newInstance(new DriverOptions()); } catch (SessionNotCreatedException e) { throw new IllegalStateException(e); } }