package Ġfr . free . n rw . commons . recent languages Ċ Ċ import Ġandroid . net . Uri Ċ import Ġfr . free . n rw . commons . Test Common s Application Ċ import Ġfr . free . n rw . commons . data . DB Open Helper Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . Mockito . mock Ċ import Ġorg . mockito . Mockito Annotations Ċ import Ġorg . power mock . reflect . White box Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ import Ġorg . ro bo lectric . annotation . Config Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ @ Config ( sdk Ġ= Ġ[ 2 1 ], Ġapplication Ġ= ĠTest Common s Application :: class ) Ċ class ĠRecent Languages Content Provider UnitTest Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġcontent Provider : ĠRecent Languages Content Provider ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġlateinit Ġvar Ġdb Open Helper : ĠDB Open Helper ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp (){ ĊĠĠĠĠĠĠĠ ĠMockito Annotations . init Mocks ( this ) ĊĠĠĠĠĠĠĠ Ġcontent Provider Ġ= ĠRecent Languages Content Provider () ĊĠĠĠĠĠĠĠ ĠWhite box . set Internal State ( content Provider , Ġ" db Open Helper ", Ġdb Open Helper ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Throws ( Exception :: class ) ĊĠĠĠ Ġfun Ġtest GetType () Ġ{ ĊĠĠĠĠĠĠĠ Ġcontent Provider . getType ( mock ( Uri :: class . java )) ĊĠĠĠ Ġ} Ċ }