Q:

No data in Mongo DB in Play framework when running in Test mode

I have play framework application v2.2 that use Mongo Database (using play-jongo).  I have some testing unit class in /test folder.  However if I run the unit class using test command or run directly from eclipse, there is no data found at all from Mongo DB, but if I run the application normally, I can see the data.  I have used Helpers.faceApplication() method but still no data at all. 
Here is the unit test code:
@Test
public void test1()  {
    Helpers.running(Helpers.fakeApplication(), new Runnable() {

        @Override
        public void run() {

            //MyUser is the mongo entity
            MyUser myUser = MyUser.findById("123");
            if (myUser ! = null) {
                Logger.info("User ID: " + myUser.id);
            } else {
                Logger.info("User is NULL");  //it always get here
            }
        }
    });

}

The myUser is always returned null if I run the test unit. 
I have feeling that the Helpers.fakeApplication doesn't read the /conf/applicaton.conf so it doesn't connect to mongo db. 
Anyone know how to connect the play to mongo db when running in test unit? 

A:

It turned out that I'm using old play-jongo version (v0.4) that doesn't support loading existing mongo database in test mode.  So my solution is to update the play-jongo to v0.5 (for play v2.1.x) by modifying the play-jongo dependency in file /project/Build.scala:
val appDependencies = Seq(
    ...
    "uk.co.panaxiom" %% "play-jongo" % "0.5.0-jongo0.4"
)

For another play version, please refer to the play-jongo's readme.md. 
Next, in /conf/application.conf I added this line:
playjongo.test-uri="mongodb://127.0.0.1:27017/mydb"

So this is the reason I need to update the play-jongo because the old version doesn't support playjongo.test-uri configuration.