used @BeforeClass annotation instead of using try catch