Fix test for factory methods.