Refactoring test classes for testng.