title: NullPointerException when extending BaseClass where driver is initialised
body: <p>I get NullPointerException when trying to separate driver initialization to a separate class.
  I'm a beginner at Java, what am I doing wrong here?</p>
  <p>BaseTest.java</p>
  <pre><code>package common;
  
  import java.util.concurrent.TimeUnit;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.testng.annotations.AfterSuite;
  import org.testng.annotations.BeforeSuite;
  import io.github.bonigarcia.wdm.WebDriverManager;
  public class BaseTest { 
  
      public static WebDriver driver = null;
      
      @BeforeSuite
      public void launchBrowser() {
          WebDriverManager.chromedriver().setup();
          ChromeDriver driver = new ChromeDriver();
          driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
          driver.manage().window().maximize();
      }
      
      @AfterSuite
      public void closeBrowser() {
          driver.close();
      }
  }
  </code></pre>
  <p>Test.java</p>
  <pre><code>package ui;
  
  import org.testng.annotations.Test;
  
  import common.BaseTest;
  
  public class ListenerDemoTest extends BaseTest{
      @Test
      public void something() {
          driver.get(&quot;https.//google.com&quot;);
      }
  }
  </code></pre>
  <p>Error Message:</p>
  <pre><code>java.lang.NullPointerException: Cannot invoke &quot;org.openqa.selenium.WebDriver.get(String)&quot; because &quot;ui.ListenerDemoTest.driver&quot; is null
      at ui.ListenerDemoTest.something(ListenerDemoTest.java:10)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      ...
  </code></pre>