Use an overload of the mock() method in Mockito to eliminate those pesky generic warnings:
https://medium.com/pragmatic-programmers/taming-a-silly-generic-warning-81e127c286db
Get the book by @kenkousen: https://pragprog.com/titles/mockito/mockito-made-clear/