Added more logic to the unit tests