Move factories test to a dedicated file