I write loads of unit tests to verify my code using JUnit 4. I favor the JUnit 4 annotation style approach over the predecessor’s style where you had to extend a certain JUnit base class. The JUnit guys also shipped a handy org.junit.Assert class which you can import statically and which provides various assertions. I am always fairly annoyed though, when organizing my imports in Eclipse the wildcard import org.junit.Assert.* gets written out to import all the various assert methods I was using in that class. Not so annoying in itself, but when adding a new assertion you get a compile error because the compiler doesn’t understand what you’re doing as I cannot recognize the method you’re calling.
I just found that you can configure Eclipse not to write rewrite the wildcard import for certain cases. See the picture how to get there.
