ObjectFactoryTest: Add tests for 'factory' option