Added Test class for Factory