// Path: common/src/main/java/com/saucelabs/common/JavaScriptExecutor.java
// public interface JavaScriptExecutor {
//     Object executeScript(String script);
// }
// 
// Path: common/src/main/java/com/saucelabs/common/JavaScriptInvokerFactory.java
// public class JavaScriptInvokerFactory {
//     private static JavaScriptExecutor customManager = null;
// 
//     public static void setJavaScriptExecutor(JavaScriptExecutor js)
//     {
//         customManager = js;
//     }
//     public static JavaScriptExecutor create(WebDriver driver)
//     {
//         if (customManager != null)
//         {
//             return customManager;
//         }
//         else
//             return new JavaScriptInvokerImpl(driver);
//     }
// }
// 
// Path: common/src/main/java/com/saucelabs/common/JavaScriptInvokerImpl.java
// public class JavaScriptInvokerImpl implements JavaScriptExecutor {
//     private final WebDriver webDriver;
// 
// 
//     public JavaScriptInvokerImpl(WebDriver driver)
//     {
//         webDriver = driver;
//     }
// 
//     @Override
//     public Object executeScript(String script) {
//         JavascriptExecutor js = (JavascriptExecutor)webDriver;
//         return js.executeScript(script);
//     }
// }


import com.saucelabs.common.JavaScriptExecutor;
import com.saucelabs.common.JavaScriptInvokerFactory;
import com.saucelabs.common.JavaScriptInvokerImpl;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
package com.saucelabs.common.unit;




public class JavaScriptInvokerFactoryTest extends BaseUnitTest {
    @Test
    public void shouldReturnObjectForTheManager()
    {
        JavaScriptExecutor jsManager = JavaScriptInvokerFactory.create(mockWebDriver);
// Path: common/src/main/java/com/saucelabs/common/JavaScriptExecutor.java
// public interface JavaScriptExecutor {
//     Object executeScript(String script);
// }
// 
// Path: common/src/main/java/com/saucelabs/common/JavaScriptInvokerFactory.java
// public class JavaScriptInvokerFactory {
//     private static JavaScriptExecutor customManager = null;
// 
//     public static void setJavaScriptExecutor(JavaScriptExecutor js)
//     {
//         customManager = js;
//     }
//     public static JavaScriptExecutor create(WebDriver driver)
//     {
//         if (customManager != null)
//         {
//             return customManager;
//         }
//         else
//             return new JavaScriptInvokerImpl(driver);
//     }
// }
// 
// Path: common/src/main/java/com/saucelabs/common/JavaScriptInvokerImpl.java
// public class JavaScriptInvokerImpl implements JavaScriptExecutor {
//     private final WebDriver webDriver;
// 
// 
//     public JavaScriptInvokerImpl(WebDriver driver)
//     {
//         webDriver = driver;
//     }
// 
//     @Override
//     public Object executeScript(String script) {
//         JavascriptExecutor js = (JavascriptExecutor)webDriver;
//         return js.executeScript(script);
//     }
// }


// Path: common/src/test/java/com/saucelabs/common/unit/JavaScriptInvokerFactoryTest.java
import com.saucelabs.common.JavaScriptExecutor;
import com.saucelabs.common.JavaScriptInvokerFactory;
import com.saucelabs.common.JavaScriptInvokerImpl;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsInstanceOf.instanceOf;

package com.saucelabs.common.unit;




public class JavaScriptInvokerFactoryTest extends BaseUnitTest {
    @Test
    public void shouldReturnObjectForTheManager()
    {
        JavaScriptExecutor jsManager = JavaScriptInvokerFactory.create(mockWebDriver);
        assertThat(jsManager, instanceOf(JavaScriptInvokerImpl.class));