Corrected unit test for factory and logger