factories tests