Я сталкиваюсь со следующей проблемой при выполнении Junits
java.lang.ClassFormatError
at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
[Note : Mocked the static inner class in Junit]
Пример:
public final class A {
public static final class B {
public String getType(){
return String;
}
}
}
In Junit class:
@Mocked final A.B mockedAB
new NonStrictExpectations()
{
{
mockedAB.getType();
result= anyString;
}
}
Java: openJDK 8 Junit: junit-4.11 jmockit: jmockit 1.9
Please suggest how to overcome this issue.