Add factories to tests