IntelliJ flags static import of assertEquals as unused - even though it is used.

Answered

Hi!

I've got the following import:

import static org.junit.Assert.assertEquals;

And I have the following test code in that test class:

assertEquals(BigInteger.ONE,actual.getFoo());

Any idea what's going on and why IntelliJ thinks the import is unused? It removed it when I asked it to organize imports, and not just in one class. This is really annoying...

1
1 comment

Please share a sample project to reproduce the problem. Also specify your IDE version.

0

Please sign in to leave a comment.