Welcome to CodeRanch!
Mockito can't mock static methods. At least, not in the last version I worked with.
You could use a different tool such as PowerMock to mock static methods, but you really shouldn't have to: If you're looking up a service using a static method such as
DriverManager.getConnection(), then you haven't designed your class well. Services should be injected as a constructor or method parameter.
In this particular case, you must refactor your code so that your class has an instance field of type
DataSource that you initialize in the constructor. Instead of calling
DriverManager.getConnection(), you call
dataSource.getConnection().
In your
unit test, you can mock the
DataSource that is passed to the constructor of your class.