Refine the unit tests