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?

 package com.bignerdranch.android.beatbox

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

    @Before
    fun setUp() {

        beatBox= mock(BeatBox::class.java)
        sound = Sound("assetPath")
        subject = SoundViewModel(beatBox)
        subject.sound = sound
    }

    @Test
    fun exposesSoundNameAsTitle(){
        //assertThat(subject.title, `is`(sound.name))
        assertSame(subject.title, sound.name)
    }

    @Test
    fun callsBeatBoxPlayButtonClicked(){
        subject.onButtonClicked()

        verify(beatBox).play(sound)
    }
}

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