Add factories tests