Let\'s say I have a non-final concrete class with a final method like the one below.
public class ABC { public final String myMethod(){ return \"test
This works :
@RunWith(PowerMockRunner.class) @PrepareForTest(ABC.class) public class ABCTest { @Test public void finalCouldBeMock() { final ABC abc = PowerMockito.mock(ABC.class); PowerMockito.when(abc.myMethod()).thenReturn("toto"); assertEquals("toto", abc.myMethod()); } }