package Ġdev . j atz uk . serv oc ont roller . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . components . Application Component Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdev . j atz uk . serv oc ont roller . db . Ser vo Database Ċ import Ġjavax . inject . Named Ċ Ċ @ Module Ċ @ Install In ( Application Component :: class ) Ċ object ĠTest App Module Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Named (" test _ db ") ĊĠĠĠ Ġfun Ġprovide InMemory Db (@ ApplicationContext Ġcontext : ĠContext ) Ġ= ĊĠĠĠĠĠĠĠ ĠRoom . in Memory Database Builder ( context , ĠSer vo Database :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. allow MainThread Queries () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () Ċ } Ċ