Add some factor function tests