How to call the common/reusable classes in java for other classes?
<pre><code>public class AssignmentBySubjectGroup extends AssignmentCommonMethods {

    public WebDriver driver;
    public StringBuffer verificationErrors = new StringBuffer();
    private static int num = 0;
    static Logger log = Logger.getLogger(Log4jTestConfig.class); // creating logger object
    public ReadPropFile r1;
    public ReadPropFile r2;


    //public ErrorCollector err = new ErrorCollector(); 

    @BeforeClass
    public void setUp() {


        this.r1 = new ReadPropFile("/config.properties");
        this.r2 = new ReadPropFile("/OR.properties");
        driver = new FirefoxDriver();
        //Assert.assertTrue(true, "Driver Not Found");

        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);    
        driver.manage().window().maximize();

        //Assert.assertNotNull(this.r1.getProp("baseUrl"));


    }           

    @Test (priority = 1)
    public void SignIn() {


        driver.get(this.r1.getProp("baseUrl"));
        //Assert.assertNotNull(this.getProp("baseUrl"));
        driver.findElement(By.id("loginButton")).click();
        //Assert.assertEquals(true, driver.findElement(By.id("loginButton")).isEnabled());
        driver.findElement(By.id("signin-email")).clear();
        //Assert.assertNotNull(driver.findElement(By.id("signin-email")));
        driver.findElement(By.id("signin-email")).sendKeys(this.r1.getProp("UserId_Teacher"));
        driver.findElement(By.id("signin-password")).clear();
        driver.findElement(By.id("signin-password")).sendKeys(this.r1.getProp("Password"));
        driver.findElement(By.cssSelector(this.r2.getProp("Login_SignIn"))).click();

    }

    @Test (priority = 2)
    public void ClickAssignmentLink() {

        driver.findElement(By.linkText("Assignments")).click();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        driver.switchTo().frame(0).switchTo().frame(0); //switching iframes
        driver.findElement(By.xpath(this.r2.getProp("Assignment_Assign_Work"))).click();
        //          driver.switchTo().defaultContent();
        driver.switchTo().frame(0).switchTo().frame(0); //Navigating to next page
    }

    @Test (priority = 3)
    public void callAssignworkMethod() throws IOException, InterruptedException, Exception, Throwable {

        AssignmentCommonMethods aaw = new AssignmentCommonMethods();

            aaw.AssignWork();

    }




    @AfterClass
    public void QuitDriver() {

        driver.quit();
        String  verificationErrorString = verificationErrors.toString();

        if (!"".equals(verificationErrorString)) {
            Assert.fail(verificationErrorString);

        }
    }

    public int getNum(){

        return num; 
    }

    public void setNum(int Number){
        num = Number;
    }

}
</code></pre>

<p>I have another class called "AssignmentsCommonMethods" which I would like to call as  a third test case in above code </p>

<pre><code>@Test (priority = 3)
    public void callAssignworkMethod() throws IOException, InterruptedException, Exception, Throwable {



   AssignmentCommonMethods aaw = new AssignmentCommonMethods();

        aaw.AssignWork();

   }
</code></pre>

<p>Its not working and the method callAssignworkMethod give a NullPointerException. I don't know why. Please guide my way!
thanks!</p>
