Use Mockito-core for create mock of final class?
问题 I find in github example how with standart Mockito make instance of final class (BluetoothGatt.class) : ... @RunWith(RobolectricTestRunner.class) @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) public class OnBoardingServiceTest { private BluetoothGattCharacteristic characteristic; private OnBoardingService service; private BluetoothGattReceiver receiver = new BluetoothGattReceiver(); @Before public void initialise() { BleDevice bleDevice = mock(BleDevice.class); when(bleDevice.getType())