Added more test functions for Factory class