Refractored unit tests