IO refactory, test cases for factory