I am using Google Guava v13.0 but when I run a JUnit test with code containing tryFind, I get this message:
java.lang.NoSuchMethodError: com.google.common.collect.Iterables.tryFind(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Lcom/google/common/base/Optional;
This only seems to happen with JUnit tests as when the production code runs there are no problems. I am using Intellij IDEA v11.1.3 and can navigate into the guava JAR file to find tryFind in the com.google.common.collect.Iterable.class.
I've seen similar posts, but I'm not sure how this relates to JUnit. Any ideas on what my issue might be?
NoSuchMethodError
as you first get aNoSuchClassException
. – Anhydrous