PowerMock бросает org.powermock.reflect.exceptions.MethodNotFoundException: No methods matching the name(s) methodInsideFoo were found in the class hierarchy of class com.something.Something.
.
Тестовый код:
Something spied = spy(new Something());
doNothing().when( spied, "methodInsideFoo", "ABC", Some.class );
spied.foo( "ABC", Some.class );
verifyPrivate( spied ).invoke( "methodInsideFoo", "ABC", Some.class );
И вот этот метод я пытаюсь смутить:
protected void methodInsideFoo ( String a, Class b )
{
System.out.println("Should not see me");
}
Но если я удаляю Class (2-й параметр), он работает. Я что-то упустил?