Added more tests for factory and template resolver.