android5-4 Exercise 3: In-memory DAO test ====================================== // app/src/androidTest/.../NoteDaoTest.kt class NoteDaoTest { private lateinit var db: AppDatabase private lateinit var dao: NoteDao @Before fun createDb() { val context = ApplicationProvider.getApplicationContext() db = Room.inMemoryDatabaseBuilder(context, AppDatabase::class.java).build() dao = db.noteDao() } @After fun closeDb() = db.close() @Test fun insertedNoteIsObserved() = runTest { dao.insert(NoteEntity(text = "Buy milk")) val notes = dao.observeNotes().first() assertEquals(listOf("Buy milk"), notes.map { it.text }) } } Likely extras (general knowledge, check): androidTestImplementation for androidx.test:runner / androidx.test.ext:junit and androidx.test:core for ApplicationProvider; org.jetbrains.kotlinx:kotlinx-coroutines-test for runTest; imports for Before, After, Test, assertEquals, first, runTest and Context; and an emulator or device to run it, because it is an androidTest. Report what you needed. Code unrun.