Organize and refactor the unit tests