What steps will reproduce the problem?
1. Write some tests, mock Enum, write some tests
2. Or see Attachment and run Tests
What is the expected output? What do you see instead?
java.lang.ArrayIndexOutOfBoundsException: 2
at com.blogspot.mstachniuk.powermockdemo.TaxCalculatorFactory.getInstance(TaxCalculatorFactory.java:6)
at com.blogspot.mstachniuk.powermockdemo.TaxCalculatorFactoryTest.shouldThrowExceptionWhenUseNonExistCountry(TaxCalculatorFactoryTest.java:44)
What version of the product are you using? On what operating system?
PowerMock 1.5 with Mockito
Maven 2.2.1
JDK 1.6.0_41
Idea 12.1.1
Eclipse 4.2
Please provide any additional information below.
In TaxCalculatorFactoryTest are 2 Tests. I will mock Enum and this test
sometimes work, sometimes not. When this test start as first, it works. When as
2nd Test I get ArrayIndexOutOfBoundsException.
This error is in Maven, Eclipse and Idea reproducible.
Original issue reported on code.google.com by mstachniuk on 13 Apr 2013 at 2:33
Original issue reported on code.google.com by
mstachniuk
on 13 Apr 2013 at 2:33Attachments: