Refactored unit tests to be more efficient