Error after listing 21.8

I am getting an error after writing the code of listing 21.8. I am getting an error for the mock function import statement. When I am trying to import the package it is not showing the mock function in the import statement. I have to import
org.mockito.Mockito.mock
But I am not getting this reference. Instead of this I am getting
org.mockito.Mockito.*
But even after importing it the error is not resolving.
Pls anyone help me.