Messy Experience with mockito

everything worked fine with testing until i got to mock(...)

then everything became messy really…

even now after the app is working fine, i still get errors in testing… (if it tests)

usually i get

Unresolved reference: mockito

what is wrong here?


import org.hamcrest.CoreMatchers.`is`
import org.junit.Assert.*

import org.junit.Before
import org.junit.Test
import org.mockito.Mockito.mock
import org.mockito.Mockito.verify

testing a unit page: 397
class SoundViewModelTest {

    private lateinit var sound: Sound
    private lateinit var subject: SoundViewModel
    private lateinit var beatBox: BeatBox

    fun setUp() {

        beatBox= mock(
        sound = Sound("assetPath")
        subject = SoundViewModel(beatBox)
        subject.sound = sound

    fun exposesSoundNameAsTitle(){
        //assertThat(subject.title, `is`(

    fun callsBeatBoxPlayButtonClicked(){


note: to remove the unresolved reference for mockito, i had to add 2 dependency in gradle

androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.28.1'
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.28.1' 

but it gave me all the tests error