-
Notifications
You must be signed in to change notification settings - Fork 238
How to mock System with 1.16 #155
Copy link
Copy link
Closed
Labels
Description
I used to mock java.System to ensure that the tested code uses System.exit() with the expected return code - but so far I only get java.lang.IllegalArgumentException: Matching real methods not found for the following mocks:
test.Test$4#exit(int)
at test.Test$4.(Test.java:178)
......
new MockUp<System>()
{
@mock
public void exit( int code )
{
//verification code here
}
};
....
Is this no longer possible? Note that I use a IBM JAVA 7
Reactions are currently unavailable