added additional tests to check error conditions in ComponentFactory