add Unit tests to Factory patter