Execute factory in global context and add a test.