Added tests for RegisteringInstanceFactory.