Added more tests to ComponentFactory