Written JUnit test for the mongo classes