Improved tests by removing static block and some duplicated code.