Added a unit test for the file factory