Android JUnit test with Context.getApplicationContext()
问题 I am currently working on an android Room Persistency database project. I have successfully implemented all functions, and am now trying to write unittests for these function. These unittests rely on calling the following function (singleton constructor; I have marked the two important lines with comments): @Database(entities = {RippleModel.class}, version = 1) public abstract class AppDatabase extends RoomDatabase { public abstract RippleModelDao rippleModelDao(); private static AppDatabase