'How to get mock final classes mock-maker-inline to work?

I'm having issue getting the mock-maker-inline to work. I followed the instructions on

enter image description here

However, i still can't mock out a final class. I also tried out the example in the document. I was wondering if there is anyway to debug what went wrong?

org.mockito.exceptions.base.MockitoException: 
Cannot mock/spy class Tests$1FinalClass
Mockito cannot mock/spy because :
 - final class

I'm on mockito org.mockito:mockito-core:3.1.0 and using

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Thanks, Derek



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source