### Question:
Grid { public static RemoteWebDriver driver() { AbstractTestSession testSession = getTestSession(); if (testSession == null) { throw new IllegalStateException("Test session not initialized. Make sure the SeLion SeleniumGridListener is " + "enabled and you have annotated your class/method with @MobileTest/@WebTest."); } if (!testSession.isStarted()) { testSession.startSession(); } RemoteWebDriver rwd = threadLocalWebDriver.get(); if (rwd == null) { throw new IllegalStateException("Driver not initialized. Is @WebTest/@MobileTest missing on class/method?"); } return rwd; } private  Grid(); static ThreadLocal<RemoteWebDriver> getThreadLocalWebDriver(); static ThreadLocal<AbstractTestSession> getThreadLocalTestSession(); @Deprecated /** * @deprecated in SeLion 1.2.0. Do not use. No alternative */ static ThreadLocal<Exception> getThreadLocalException(); static long getExecutionTimeoutValue(); static RemoteWebDriver driver(); static AbstractTestSession getTestSession(); static MobileTestSession getMobileTestSession(); static WebTestSession getWebTestSession(); static void open(String url); static RemoteNodeInformation getRemoteNodeInfo(String hostName, int port, SessionId session);  }### Answer:
@WebTest @Test(groups = "functional") public void testGetDriver() { assertNotNull(Grid.driver(), "verify that the driver instance returned is not null"); }
@Test(expectedExceptions = { IllegalStateException.class }) public void testGridDriverWithOutWebTest() { Grid.driver().get("http: }