Covered more cases in the unit test