Fix tests to work with new factories.