modularized the unit test