Updates test to use factory