/*
 * (C) Copyright 2016 Boni Garcia (http://bonigarcia.github.io/)
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl-2.1.html
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 */
package io.github.bonigarcia.wdm.test;

import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;

import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriver;

import io.github.bonigarcia.wdm.PhantomJsDriverManager;

/**
 * Test with PhatomJS beta.
 *
 * @author Boni Garcia (boni.gg@gmail.com)
 * @since 1.4.0
 */
public class PhantomJsBetaTest {

    @BeforeClass
    public static void setupClass() {
        PhantomJsDriverManager.getInstance().useBetaVersions().setup();
    }

    @Before
    public void setupTest() {
        driver = new PhantomJSDriver();
    }

    protected WebDriver driver;

    @After
    public void teardown() {
        if (driver != null) {
            driver.quit();
        }
    }

    @Test
    public void testPhantomBeta() {
        String binaryPath = PhantomJsDriverManager.getInstance()
                .getBinaryPath();
        assertThat(binaryPath, notNullValue());
    }
}

@@ -756,183 +756,42 @@
 nit.
-After;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0Aimport org.openqa.selenium.WebDriver;%0Aimport org.openqa.selenium.phantomjs.PhantomJSDriver
+BeforeClass;%0Aimport org.junit.Test
 ;%0A%0Ai
@@ -1116,244 +1116,8 @@
  %7D%0A%0A
-    @Before%0A    public void setupTest() %7B%0A        driver = new PhantomJSDriver();%0A    %7D%0A%0A    protected WebDriver driver;%0A%0A    @After%0A    public void teardown() %7B%0A        if (driver != null) %7B%0A            driver.quit();%0A        %7D%0A    %7D%0A%0A
     

Simplify PhantomJS for beta version test