updating tests to use class factories