Room has a builder that created an in-memory database:
Room.inMemoryDatabaseBuilder(context, AppDatabase::class.java, DATABASE_NAME)
If you combine this with dependency injection (to build a singleton of the database instance) you'll get a robust and extensible solution.