Fixing broken unit test caused by factory change