The documentation is identical:
Is using one version preferable to the others?
And from the comments it appears that there is a third version: org.hamcrest.Matchers.equalTo
The documentation is identical:
Is using one version preferable to the others?
And from the comments it appears that there is a third version: org.hamcrest.Matchers.equalTo
in fact they are the same.
CoreMatchers calls IsEqualMatcher
public static <T> org.hamcrest.Matcher<T> equalTo(T operand) {
return org.hamcrest.core.IsEqual.<T>equalTo(operand);
}
To answer the question which one to use - it all depends on the code conventions employed in specific project.