Restructured the tests to have a better coverage