diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index 19f8664533e..d3bd85b6056 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -210,6 +210,11 @@
compile
true
+
+ org.hamcrest
+ hamcrest-library
+ test
+
org.mockito
mockito-core
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestClassFinder.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestClassFinder.java
index b1c09032247..cf97e313cf0 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestClassFinder.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestClassFinder.java
@@ -17,7 +17,8 @@
*/
package org.apache.hadoop.hbase;
-import static org.junit.Assert.assertArrayEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -295,7 +296,10 @@ public class TestClassFinder {
Set> pkgClasses = allClassesFinder.findClasses(
ClassFinder.class.getPackage().getName(), false);
Set> defaultClasses = allClassesFinder.findClasses(false);
- assertArrayEquals(pkgClasses.toArray(), defaultClasses.toArray());
+ Object[] pkgClassesArray = pkgClasses.toArray();
+ Object[] defaultClassesArray = defaultClasses.toArray();
+ assertEquals(pkgClassesArray.length, defaultClassesArray.length);
+ assertThat(pkgClassesArray, arrayContainingInAnyOrder(defaultClassesArray));
}
private static class FileAndPath {
diff --git a/pom.xml b/pom.xml
index c3c65ff2877..bfb5e1b8394 100755
--- a/pom.xml
+++ b/pom.xml
@@ -2114,13 +2114,11 @@
org.hamcrest
hamcrest-core
${hamcrest.version}
- test
org.hamcrest
hamcrest-library
${hamcrest.version}
- test
org.mockito