В моем методе есть локальная переменная, которая является финальной. Как я могу издеваться?
Код: Выделить всё
public void method(){
final int i=myService.getNumber();
}
Код: Выделить всё
when(myService.getNumber()).thenReturn(1);
My project is using Java 7, is there way using reflection or something else to realize this mock
Источник: https://stackoverflow.com/questions/318 ... l-variable
Мобильная версия