I'm having a problem with my test application which is follows. I'm having following code:
@Test(expected = InvalidStateException.class)
public void testLiianPitkaKayttajatunnus()
{...}
I'm using Eclipse and it says "InvalidStateException cannot be resolved to a type"
and as we know if eclipse notice a problem it underline it with red wave line. I have been trying to search solutions but still not found any. I have tried following things but none of them has solved the problem:
- Adding
org.apache.openjpa
dependency to mypom.xml
and adding line before class code"import org.apache.openjpa.persistence.InvalidStateException;"
- In thread, it is said that if you have in your class extension of other class, it should be taken out. This didn't helped neither.
- In the same thread one advice is to use JUnit 4.4 and it didn't helped neither.
So my question is how this problem can be solved?
For additional information, my class start follows (imports are not mentioned here)
public class TietorakenneTest
extends TietokantaTestCase {....}
and JUnit version that I use is 4.10,
any help is appreciated. If you need any other information about the code, please let me know and I will put them here.