fixing karma unit tests. Adding test for mongoFactory