test case for factorize