Implemented test for Factory