Repository: mockito/mockito
Issue: Unit tests improvements: migrate from legacy FEST Assert code to AssertJ
Labels: refactoring

Triggered by #250.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/build.gradle b/build.gradle
index 635663b403..6bbc7b7efd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -63,8 +63,7 @@ dependencies {
 
     testCompile 'org.ow2.asm:asm:5.0.4'
 
-    testCompile "org.easytesting:fest-assert:1.3"
-    testCompile "org.easytesting:fest-util:1.1.4"
+    testCompile 'org.assertj:assertj-core:2.1.0'
 
     testRuntime configurations.provided
 


Test patch:
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java
index 06ad4c6ed9..640142a15a 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java
@@ -12,7 +12,7 @@
 import java.util.HashMap;
 import java.util.List;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 @Listeners(MockitoTestNGListener.class)
 public class AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest {
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java
index 4a1b2ad959..79c3071408 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java
@@ -9,7 +9,7 @@
 
 import java.util.List;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java
index a268a9a364..76095f3af4 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java
@@ -9,7 +9,7 @@
 import java.io.IOException;
 import java.util.Map;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.when;
 
 @Listeners(MockitoTestNGListener.class)
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java
index b8075dcab4..5cbe4fc20d 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java
@@ -8,7 +8,7 @@
 import java.io.IOException;
 import java.util.Map;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.when;
 
 public class DontResetMocksIfNoListenerTest {
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java
index 49eaeacd3f..c26075825c 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java
@@ -8,7 +8,7 @@
 
 import java.util.Observer;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 @Listeners(MockitoTestNGListener.class)
 public class EnsureMocksAreInitializedBeforeBeforeClassMethodTest {
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java
index c69118efa4..2a8cb70685 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java
@@ -5,7 +5,7 @@
 
 import java.util.Map;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.testng.Assert.fail;
 
 public class InitializeChildTestWhenParentHasListenerTest extends ParentTest {
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java
index ba3214fae2..f6c3933b9d 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java
@@ -11,7 +11,7 @@
 import java.util.List;
 import java.util.Observable;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.BDDMockito.given;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.never;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java
index 091a5d85a1..1133adfac9 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java
@@ -10,7 +10,7 @@
 import java.util.List;
 import java.util.Map;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 public class TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest {
 
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java
index 9720c94101..0870b9bb72 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java
@@ -7,7 +7,7 @@
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.testng.Assert.assertTrue;
 
 @Test(
diff --git a/subprojects/testng/testng.gradle b/subprojects/testng/testng.gradle
index 1e6be98732..7b0fab9d6c 100644
--- a/subprojects/testng/testng.gradle
+++ b/subprojects/testng/testng.gradle
@@ -46,7 +46,7 @@ uploadArchives {
 dependencies {
     compile project.rootProject
     compile 'org.testng:testng:6.3.1'
-    testCompile 'org.easytesting:fest-assert:1.4'
+    testCompile 'org.assertj:assertj-core:2.1.0'
 }
 
 test {
diff --git a/test/org/mockito/AnnotationsAreCopiedFromMockedTypeTest.java b/test/org/mockito/AnnotationsAreCopiedFromMockedTypeTest.java
index 9635c9b103..09cdab4997 100644
--- a/test/org/mockito/AnnotationsAreCopiedFromMockedTypeTest.java
+++ b/test/org/mockito/AnnotationsAreCopiedFromMockedTypeTest.java
@@ -1,6 +1,6 @@
 package org.mockito;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Ignore;
 import org.junit.Test;
 
diff --git a/test/org/mockito/internal/configuration/MockInjectionTest.java b/test/org/mockito/internal/configuration/MockInjectionTest.java
index fbb2f6e16f..32993ebd58 100644
--- a/test/org/mockito/internal/configuration/MockInjectionTest.java
+++ b/test/org/mockito/internal/configuration/MockInjectionTest.java
@@ -14,7 +14,7 @@
 import java.util.Observer;
 import java.util.Set;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
 
 @SuppressWarnings("unchecked")
diff --git a/test/org/mockito/internal/creation/MockSettingsImplTest.java b/test/org/mockito/internal/creation/MockSettingsImplTest.java
index 57fc5570a4..f67bcd78b3 100644
--- a/test/org/mockito/internal/creation/MockSettingsImplTest.java
+++ b/test/org/mockito/internal/creation/MockSettingsImplTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.creation;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.exceptions.base.MockitoException;
diff --git a/test/org/mockito/internal/creation/bytebuddy/ByteBuddyMockMakerTest.java b/test/org/mockito/internal/creation/bytebuddy/ByteBuddyMockMakerTest.java
index e8578bccf0..8b55b7f650 100644
--- a/test/org/mockito/internal/creation/bytebuddy/ByteBuddyMockMakerTest.java
+++ b/test/org/mockito/internal/creation/bytebuddy/ByteBuddyMockMakerTest.java
@@ -18,7 +18,7 @@
 
 import java.util.List;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockitoutil.ClassLoaders.coverageTool;
 
diff --git a/test/org/mockito/internal/creation/bytebuddy/CachingMockBytecodeGeneratorTest.java b/test/org/mockito/internal/creation/bytebuddy/CachingMockBytecodeGeneratorTest.java
index cbbcfd840a..d66c152a2e 100644
--- a/test/org/mockito/internal/creation/bytebuddy/CachingMockBytecodeGeneratorTest.java
+++ b/test/org/mockito/internal/creation/bytebuddy/CachingMockBytecodeGeneratorTest.java
@@ -1,6 +1,6 @@
 package org.mockito.internal.creation.bytebuddy;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assume.assumeTrue;
 import static org.mockito.internal.creation.bytebuddy.MockFeatures.withMockFeatures;
 import static org.mockitoutil.ClassLoaders.inMemoryClassLoader;
diff --git a/test/org/mockito/internal/debugging/VerboseMockInvocationLoggerTest.java b/test/org/mockito/internal/debugging/VerboseMockInvocationLoggerTest.java
index 6bf40a5b5e..c5e3c913c0 100644
--- a/test/org/mockito/internal/debugging/VerboseMockInvocationLoggerTest.java
+++ b/test/org/mockito/internal/debugging/VerboseMockInvocationLoggerTest.java
@@ -16,7 +16,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 public class VerboseMockInvocationLoggerTest {
 
diff --git a/test/org/mockito/internal/handler/InvocationNotifierHandlerTest.java b/test/org/mockito/internal/handler/InvocationNotifierHandlerTest.java
index 5216f74168..1adb2a22cc 100644
--- a/test/org/mockito/internal/handler/InvocationNotifierHandlerTest.java
+++ b/test/org/mockito/internal/handler/InvocationNotifierHandlerTest.java
@@ -22,7 +22,7 @@
 import java.text.ParseException;
 import java.util.ArrayList;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.BDDMockito.given;
 import static org.mockito.BDDMockito.willThrow;
diff --git a/test/org/mockito/internal/invocation/InvocationMatcherTest.java b/test/org/mockito/internal/invocation/InvocationMatcherTest.java
index 282bd8a1bf..a866f0fcbb 100644
--- a/test/org/mockito/internal/invocation/InvocationMatcherTest.java
+++ b/test/org/mockito/internal/invocation/InvocationMatcherTest.java
@@ -5,7 +5,7 @@
 
 package org.mockito.internal.invocation;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentMatcher;
diff --git a/test/org/mockito/internal/matchers/CapturingMatcherTest.java b/test/org/mockito/internal/matchers/CapturingMatcherTest.java
index b3bbbc76ce..783e03663e 100644
--- a/test/org/mockito/internal/matchers/CapturingMatcherTest.java
+++ b/test/org/mockito/internal/matchers/CapturingMatcherTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.matchers;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.exceptions.base.MockitoException;
 import org.mockitoutil.TestBase;
diff --git a/test/org/mockito/internal/matchers/VarargCapturingMatcherTest.java b/test/org/mockito/internal/matchers/VarargCapturingMatcherTest.java
index d6763fc0a3..6d517087a3 100644
--- a/test/org/mockito/internal/matchers/VarargCapturingMatcherTest.java
+++ b/test/org/mockito/internal/matchers/VarargCapturingMatcherTest.java
@@ -5,7 +5,7 @@
 import org.mockito.exceptions.base.MockitoException;
 
 import static java.util.Arrays.asList;
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 
 public class VarargCapturingMatcherTest {
diff --git a/test/org/mockito/internal/progress/HandyReturnValuesTest.java b/test/org/mockito/internal/progress/HandyReturnValuesTest.java
index f9ddd0e7e0..1894dea7a0 100644
--- a/test/org/mockito/internal/progress/HandyReturnValuesTest.java
+++ b/test/org/mockito/internal/progress/HandyReturnValuesTest.java
@@ -6,7 +6,7 @@
 
 import org.junit.Test;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
diff --git a/test/org/mockito/internal/stubbing/answers/AnswersValidatorTest.java b/test/org/mockito/internal/stubbing/answers/AnswersValidatorTest.java
index 9ec0d7ea6f..431c395a24 100644
--- a/test/org/mockito/internal/stubbing/answers/AnswersValidatorTest.java
+++ b/test/org/mockito/internal/stubbing/answers/AnswersValidatorTest.java
@@ -15,7 +15,7 @@
 import java.nio.charset.CharacterCodingException;
 import java.util.ArrayList;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
diff --git a/test/org/mockito/internal/stubbing/answers/ReturnsArgumentAtTest.java b/test/org/mockito/internal/stubbing/answers/ReturnsArgumentAtTest.java
index 9977eb6fcb..44481ddc9c 100644
--- a/test/org/mockito/internal/stubbing/answers/ReturnsArgumentAtTest.java
+++ b/test/org/mockito/internal/stubbing/answers/ReturnsArgumentAtTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.stubbing.answers;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import org.junit.Test;
 import org.mockito.internal.invocation.InvocationBuilder;
diff --git a/test/org/mockito/internal/stubbing/defaultanswers/ReturnsGenericDeepStubsTest.java b/test/org/mockito/internal/stubbing/defaultanswers/ReturnsGenericDeepStubsTest.java
index a9422f8525..44066b8ced 100644
--- a/test/org/mockito/internal/stubbing/defaultanswers/ReturnsGenericDeepStubsTest.java
+++ b/test/org/mockito/internal/stubbing/defaultanswers/ReturnsGenericDeepStubsTest.java
@@ -11,7 +11,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 
diff --git a/test/org/mockito/internal/util/MockCreationValidatorTest.java b/test/org/mockito/internal/util/MockCreationValidatorTest.java
index 1cf6f8beb2..f911e4f7be 100644
--- a/test/org/mockito/internal/util/MockCreationValidatorTest.java
+++ b/test/org/mockito/internal/util/MockCreationValidatorTest.java
@@ -14,7 +14,7 @@
 import java.util.Observer;
 
 import static java.util.Arrays.asList;
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 
 @SuppressWarnings("unchecked")
diff --git a/test/org/mockito/internal/util/MockUtilTest.java b/test/org/mockito/internal/util/MockUtilTest.java
index 726804f9a6..43b0afd2fc 100644
--- a/test/org/mockito/internal/util/MockUtilTest.java
+++ b/test/org/mockito/internal/util/MockUtilTest.java
@@ -5,7 +5,7 @@
 
 package org.mockito.internal.util;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.mockito.exceptions.base.MockitoException;
diff --git a/test/org/mockito/internal/util/collections/HashCodeAndEqualsSafeSetTest.java b/test/org/mockito/internal/util/collections/HashCodeAndEqualsSafeSetTest.java
index 366595e15b..e8dc0c2688 100644
--- a/test/org/mockito/internal/util/collections/HashCodeAndEqualsSafeSetTest.java
+++ b/test/org/mockito/internal/util/collections/HashCodeAndEqualsSafeSetTest.java
@@ -10,7 +10,7 @@
 import java.util.List;
 import java.util.Observer;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
 
 public class HashCodeAndEqualsSafeSetTest {
diff --git a/test/org/mockito/internal/util/junit/JUnitFailureHackerTest.java b/test/org/mockito/internal/util/junit/JUnitFailureHackerTest.java
index 1409f07b22..5a0fbebc5c 100644
--- a/test/org/mockito/internal/util/junit/JUnitFailureHackerTest.java
+++ b/test/org/mockito/internal/util/junit/JUnitFailureHackerTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.util.junit;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.junit.runner.Description;
 import org.junit.runner.notification.Failure;
diff --git a/test/org/mockito/internal/util/reflection/BeanPropertySetterTest.java b/test/org/mockito/internal/util/reflection/BeanPropertySetterTest.java
index 9bd1a8d681..a0b6119a8b 100644
--- a/test/org/mockito/internal/util/reflection/BeanPropertySetterTest.java
+++ b/test/org/mockito/internal/util/reflection/BeanPropertySetterTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.util.reflection;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
 import java.io.File;
diff --git a/test/org/mockito/internal/util/reflection/FieldsTest.java b/test/org/mockito/internal/util/reflection/FieldsTest.java
index ef8409fc54..d86fb30370 100644
--- a/test/org/mockito/internal/util/reflection/FieldsTest.java
+++ b/test/org/mockito/internal/util/reflection/FieldsTest.java
@@ -8,7 +8,7 @@
 
 import java.lang.reflect.Field;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.internal.util.reflection.Fields.syntheticField;
 
 public class FieldsTest {
diff --git a/test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java b/test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java
index 3beb894793..565e14bbda 100644
--- a/test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java
+++ b/test/org/mockito/internal/util/reflection/GenericMetadataSupportTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.util.reflection;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.internal.util.reflection.GenericMetadataSupport.inferFrom;
 
@@ -73,19 +73,19 @@ public void can_get_raw_type_from_ParameterizedType() throws Exception {
 
     @Test
     public void can_get_type_variables_from_Class() throws Exception {
-        assertThat(inferFrom(GenericsNest.class).actualTypeArguments().keySet()).hasSize(1).onProperty("name").contains("K");
+        assertThat(inferFrom(GenericsNest.class).actualTypeArguments().keySet()).hasSize(1).extracting("name").contains("K");
         assertThat(inferFrom(ListOfNumbers.class).actualTypeArguments().keySet()).isEmpty();
-        assertThat(inferFrom(ListOfAnyNumbers.class).actualTypeArguments().keySet()).hasSize(1).onProperty("name").contains("N");
-        assertThat(inferFrom(Map.class).actualTypeArguments().keySet()).hasSize(2).onProperty("name").contains("K", "V");
+        assertThat(inferFrom(ListOfAnyNumbers.class).actualTypeArguments().keySet()).hasSize(1).extracting("name").contains("N");
+        assertThat(inferFrom(Map.class).actualTypeArguments().keySet()).hasSize(2).extracting("name").contains("K", "V");
         assertThat(inferFrom(Serializable.class).actualTypeArguments().keySet()).isEmpty();
         assertThat(inferFrom(StringList.class).actualTypeArguments().keySet()).isEmpty();
     }
 
     @Test
     public void can_get_type_variables_from_ParameterizedType() throws Exception {
-        assertThat(inferFrom(GenericsNest.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).hasSize(2).onProperty("name").contains("K", "V");
-        assertThat(inferFrom(ListOfAnyNumbers.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).hasSize(1).onProperty("name").contains("E");
-        assertThat(inferFrom(Integer.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).hasSize(1).onProperty("name").contains("T");
+        assertThat(inferFrom(GenericsNest.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).hasSize(2).extracting("name").contains("K", "V");
+        assertThat(inferFrom(ListOfAnyNumbers.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).hasSize(1).extracting("name").contains("E");
+        assertThat(inferFrom(Integer.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).hasSize(1).extracting("name").contains("T");
         assertThat(inferFrom(StringBuilder.class.getGenericInterfaces()[0]).actualTypeArguments().keySet()).isEmpty();
         assertThat(inferFrom(StringList.class).actualTypeArguments().keySet()).isEmpty();
     }
diff --git a/test/org/mockito/internal/util/reflection/ParameterizedConstructorInstantiatorTest.java b/test/org/mockito/internal/util/reflection/ParameterizedConstructorInstantiatorTest.java
index ada6a84113..2d234c0c5f 100644
--- a/test/org/mockito/internal/util/reflection/ParameterizedConstructorInstantiatorTest.java
+++ b/test/org/mockito/internal/util/reflection/ParameterizedConstructorInstantiatorTest.java
@@ -22,7 +22,7 @@
 import java.util.Observer;
 import java.util.Set;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 import static org.mockito.BDDMockito.given;
diff --git a/test/org/mockito/internal/util/reflection/SuperTypesLastSorterTest.java b/test/org/mockito/internal/util/reflection/SuperTypesLastSorterTest.java
index 4a635b7e7d..677a81a96a 100644
--- a/test/org/mockito/internal/util/reflection/SuperTypesLastSorterTest.java
+++ b/test/org/mockito/internal/util/reflection/SuperTypesLastSorterTest.java
@@ -5,7 +5,7 @@
 import java.lang.reflect.Field;
 import java.util.*;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 @SuppressWarnings("unused")
 public class SuperTypesLastSorterTest {
diff --git a/test/org/mockito/internal/verification/NoMoreInteractionsTest.java b/test/org/mockito/internal/verification/NoMoreInteractionsTest.java
index ff87144842..725085b830 100644
--- a/test/org/mockito/internal/verification/NoMoreInteractionsTest.java
+++ b/test/org/mockito/internal/verification/NoMoreInteractionsTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockito.internal.verification;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.exceptions.verification.NoInteractionsWanted;
 import org.mockito.exceptions.verification.VerificationInOrderFailure;
diff --git a/test/org/mockitousage/annotation/MockInjectionUsingConstructorIssue421Test.java b/test/org/mockitousage/annotation/MockInjectionUsingConstructorIssue421Test.java
index 1438ddf0b9..ba889814bd 100644
--- a/test/org/mockitousage/annotation/MockInjectionUsingConstructorIssue421Test.java
+++ b/test/org/mockitousage/annotation/MockInjectionUsingConstructorIssue421Test.java
@@ -5,7 +5,7 @@
 
 package org.mockitousage.annotation;
 
-import static org.fest.assertions.Assertions.*;
+import static org.assertj.core.api.Assertions.*;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
diff --git a/test/org/mockitousage/annotation/MockInjectionUsingConstructorTest.java b/test/org/mockitousage/annotation/MockInjectionUsingConstructorTest.java
index 6a8857a547..816863a04a 100644
--- a/test/org/mockitousage/annotation/MockInjectionUsingConstructorTest.java
+++ b/test/org/mockitousage/annotation/MockInjectionUsingConstructorTest.java
@@ -24,7 +24,7 @@
 import java.util.List;
 import java.util.Set;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
diff --git a/test/org/mockitousage/annotation/MockInjectionUsingSetterOrPropertyTest.java b/test/org/mockitousage/annotation/MockInjectionUsingSetterOrPropertyTest.java
index a530084da1..9b51e0b243 100644
--- a/test/org/mockitousage/annotation/MockInjectionUsingSetterOrPropertyTest.java
+++ b/test/org/mockitousage/annotation/MockInjectionUsingSetterOrPropertyTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockitousage.annotation;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
diff --git a/test/org/mockitousage/annotation/SpyAnnotationTest.java b/test/org/mockitousage/annotation/SpyAnnotationTest.java
index b67f1365cd..77f6b5e3ed 100644
--- a/test/org/mockitousage/annotation/SpyAnnotationTest.java
+++ b/test/org/mockitousage/annotation/SpyAnnotationTest.java
@@ -13,7 +13,7 @@
 import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
diff --git a/test/org/mockitousage/annotation/WrongSetOfAnnotationsTest.java b/test/org/mockitousage/annotation/WrongSetOfAnnotationsTest.java
index 4f909dbc2f..8e6225d565 100644
--- a/test/org/mockitousage/annotation/WrongSetOfAnnotationsTest.java
+++ b/test/org/mockitousage/annotation/WrongSetOfAnnotationsTest.java
@@ -5,7 +5,7 @@
 package org.mockitousage.annotation;
 
 import java.util.List;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Captor;
diff --git a/test/org/mockitousage/basicapi/MockingMultipleInterfacesTest.java b/test/org/mockitousage/basicapi/MockingMultipleInterfacesTest.java
index de78ac8d55..a7517c605b 100644
--- a/test/org/mockitousage/basicapi/MockingMultipleInterfacesTest.java
+++ b/test/org/mockitousage/basicapi/MockingMultipleInterfacesTest.java
@@ -5,8 +5,8 @@
 
 package org.mockitousage.basicapi;
 
-import static org.fest.assertions.Assertions.assertThat;
-import static org.fest.assertions.Fail.fail;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.withSettings;
 import static org.mockitoutil.ClassLoaders.inMemoryClassLoader;
diff --git a/test/org/mockitousage/basicapi/MocksSerializationForAnnotationTest.java b/test/org/mockitousage/basicapi/MocksSerializationForAnnotationTest.java
index 214c7c0a47..e0016e5ee6 100644
--- a/test/org/mockitousage/basicapi/MocksSerializationForAnnotationTest.java
+++ b/test/org/mockitousage/basicapi/MocksSerializationForAnnotationTest.java
@@ -24,7 +24,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Observable;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.InOrder;
 import org.mockito.Mock;
diff --git a/test/org/mockitousage/basicapi/MocksSerializationTest.java b/test/org/mockitousage/basicapi/MocksSerializationTest.java
index 90056c61ed..79f36ea387 100644
--- a/test/org/mockitousage/basicapi/MocksSerializationTest.java
+++ b/test/org/mockitousage/basicapi/MocksSerializationTest.java
@@ -26,7 +26,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Observable;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.InOrder;
 import org.mockito.Mockito;
diff --git a/test/org/mockitousage/bugs/EqualsWithDeltaTest.java b/test/org/mockitousage/bugs/EqualsWithDeltaTest.java
index da6d9281ff..582a6a1ece 100644
--- a/test/org/mockitousage/bugs/EqualsWithDeltaTest.java
+++ b/test/org/mockitousage/bugs/EqualsWithDeltaTest.java
@@ -4,7 +4,7 @@
 import org.mockito.ArgumentMatcher;
 import org.mockito.internal.matchers.EqualsWithDelta;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 public class EqualsWithDeltaTest {
 
diff --git a/test/org/mockitousage/bugs/IOOBExceptionShouldNotBeThrownWhenNotCodingFluentlyTest.java b/test/org/mockitousage/bugs/IOOBExceptionShouldNotBeThrownWhenNotCodingFluentlyTest.java
index c66291d4c3..e462276863 100644
--- a/test/org/mockitousage/bugs/IOOBExceptionShouldNotBeThrownWhenNotCodingFluentlyTest.java
+++ b/test/org/mockitousage/bugs/IOOBExceptionShouldNotBeThrownWhenNotCodingFluentlyTest.java
@@ -10,7 +10,7 @@
 
 import java.util.Map;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.mock;
diff --git a/test/org/mockitousage/bugs/ParentClassNotPublicTest.java b/test/org/mockitousage/bugs/ParentClassNotPublicTest.java
index 961b150ec1..8b6c0f78e2 100644
--- a/test/org/mockitousage/bugs/ParentClassNotPublicTest.java
+++ b/test/org/mockitousage/bugs/ParentClassNotPublicTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockitousage.bugs;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/test/org/mockitousage/bugs/SpyShouldHaveNiceNameTest.java b/test/org/mockitousage/bugs/SpyShouldHaveNiceNameTest.java
index 6e297efce7..82b6241dc5 100644
--- a/test/org/mockitousage/bugs/SpyShouldHaveNiceNameTest.java
+++ b/test/org/mockitousage/bugs/SpyShouldHaveNiceNameTest.java
@@ -5,7 +5,7 @@
 
 package org.mockitousage.bugs;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.Spy;
 import org.mockitoutil.TestBase;
diff --git a/test/org/mockitousage/bugs/creation/ShouldAllowInlineMockCreationTest.java b/test/org/mockitousage/bugs/creation/ShouldAllowInlineMockCreationTest.java
index 3751a89047..568ef18ad4 100644
--- a/test/org/mockitousage/bugs/creation/ShouldAllowInlineMockCreationTest.java
+++ b/test/org/mockitousage/bugs/creation/ShouldAllowInlineMockCreationTest.java
@@ -5,7 +5,7 @@
 
 package org.mockitousage.bugs.creation;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.Spy;
diff --git a/test/org/mockitousage/bugs/deepstubs/DeepStubsWronglyReportsSerializationProblemsTest.java b/test/org/mockitousage/bugs/deepstubs/DeepStubsWronglyReportsSerializationProblemsTest.java
index 6344fab10c..8c20f80d92 100644
--- a/test/org/mockitousage/bugs/deepstubs/DeepStubsWronglyReportsSerializationProblemsTest.java
+++ b/test/org/mockitousage/bugs/deepstubs/DeepStubsWronglyReportsSerializationProblemsTest.java
@@ -2,7 +2,7 @@
 
 import org.junit.Test;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 
diff --git a/test/org/mockitousage/bugs/injection/Issue353InjectionMightNotHappenInCertainConfigurationTest.java b/test/org/mockitousage/bugs/injection/Issue353InjectionMightNotHappenInCertainConfigurationTest.java
index 26b075ea1c..f6acc8a375 100644
--- a/test/org/mockitousage/bugs/injection/Issue353InjectionMightNotHappenInCertainConfigurationTest.java
+++ b/test/org/mockitousage/bugs/injection/Issue353InjectionMightNotHappenInCertainConfigurationTest.java
@@ -10,7 +10,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertSame;
 
 @RunWith(MockitoJUnitRunner.class)
diff --git a/test/org/mockitousage/configuration/ClassCacheVersusClassReloadingTest.java b/test/org/mockitousage/configuration/ClassCacheVersusClassReloadingTest.java
index 9193b95b2f..25d8604230 100644
--- a/test/org/mockitousage/configuration/ClassCacheVersusClassReloadingTest.java
+++ b/test/org/mockitousage/configuration/ClassCacheVersusClassReloadingTest.java
@@ -5,11 +5,11 @@
 package org.mockitousage.configuration;
 
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 import java.util.concurrent.Callable;
-import org.fest.assertions.Condition;
+import org.assertj.core.api.Condition;
 import org.junit.Assume;
 import org.junit.Test;
 import org.mockito.exceptions.base.MockitoException;
@@ -38,8 +38,8 @@ public void should_throw_ClassCastException_on_second_call() throws Exception {
                     .containsIgnoringCase("objenesis")
                     .containsIgnoringCase("MockitoConfiguration");
             assertThat(e.getCause())
-                    .satisfies(thatCceIsThrownFrom("java.lang.Class.cast"))
-                    .satisfies(thatCceIsThrownFrom("org.mockito.internal.creation.cglib.ClassImposterizer.imposterise"));
+                    .has(cceIsThrownFrom("java.lang.Class.cast"))
+                    .has(cceIsThrownFrom("org.mockito.internal.creation.cglib.ClassImposterizer.imposterise"));
         }
     }
 
@@ -51,7 +51,7 @@ public void should_not_throw_ClassCastException_when_objenesis_cache_disabled()
         doInNewChildRealm(testMethodClassLoaderRealm, "org.mockitousage.configuration.ClassCacheVersusClassReloadingTest$DoTheMocking");
     }
 
-    private Condition<Throwable> thatCceIsThrownFrom(final String stacktraceElementDescription) {
+    private Condition<Throwable> cceIsThrownFrom(final String stacktraceElementDescription) {
         return new Condition<Throwable>() {
             @Override
             public boolean matches(Throwable throwable) {
diff --git a/test/org/mockitousage/debugging/InvocationListenerCallbackTest.java b/test/org/mockitousage/debugging/InvocationListenerCallbackTest.java
index 040b06c3a8..56828dd4a8 100644
--- a/test/org/mockitousage/debugging/InvocationListenerCallbackTest.java
+++ b/test/org/mockitousage/debugging/InvocationListenerCallbackTest.java
@@ -10,7 +10,7 @@
 import org.mockito.listeners.InvocationListener;
 import org.mockito.listeners.MethodInvocationReport;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.BDDMockito.given;
 import static org.mockito.BDDMockito.willReturn;
diff --git a/test/org/mockitousage/debugging/VerboseLoggingOfInvocationsOnMockTest.java b/test/org/mockitousage/debugging/VerboseLoggingOfInvocationsOnMockTest.java
index 588e62abb3..3dbaa0ffea 100644
--- a/test/org/mockitousage/debugging/VerboseLoggingOfInvocationsOnMockTest.java
+++ b/test/org/mockitousage/debugging/VerboseLoggingOfInvocationsOnMockTest.java
@@ -12,7 +12,7 @@
 import static org.mockito.Mockito.withSettings;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/test/org/mockitousage/matchers/CapturingArgumentsTest.java b/test/org/mockitousage/matchers/CapturingArgumentsTest.java
index 379075d414..43c362a9b4 100644
--- a/test/org/mockitousage/matchers/CapturingArgumentsTest.java
+++ b/test/org/mockitousage/matchers/CapturingArgumentsTest.java
@@ -5,7 +5,7 @@
 
 package org.mockitousage.matchers;
 
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.exceptions.base.MockitoException;
diff --git a/test/org/mockitousage/matchers/InvalidUseOfMatchersTest.java b/test/org/mockitousage/matchers/InvalidUseOfMatchersTest.java
index 7b12324806..756c9d0388 100644
--- a/test/org/mockitousage/matchers/InvalidUseOfMatchersTest.java
+++ b/test/org/mockitousage/matchers/InvalidUseOfMatchersTest.java
@@ -14,7 +14,7 @@
 import org.mockito.runners.MockitoJUnitRunner;
 import org.mockitousage.IMethods;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.when;
diff --git a/test/org/mockitousage/misuse/SpyStubbingMisuseTest.java b/test/org/mockitousage/misuse/SpyStubbingMisuseTest.java
index 7d9cabdae0..77179ad292 100644
--- a/test/org/mockitousage/misuse/SpyStubbingMisuseTest.java
+++ b/test/org/mockitousage/misuse/SpyStubbingMisuseTest.java
@@ -8,7 +8,7 @@
 import org.mockito.exceptions.misusing.WrongTypeOfReturnValue;
 
 import static org.junit.Assert.fail;
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.*;
 
 public class SpyStubbingMisuseTest {
diff --git a/test/org/mockitousage/serialization/DeepStubsSerializableTest.java b/test/org/mockitousage/serialization/DeepStubsSerializableTest.java
index 800a58e2e1..bdd5cee862 100644
--- a/test/org/mockitousage/serialization/DeepStubsSerializableTest.java
+++ b/test/org/mockitousage/serialization/DeepStubsSerializableTest.java
@@ -1,6 +1,6 @@
 package org.mockitousage.serialization;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
diff --git a/test/org/mockitousage/stubbing/DeepStubbingTest.java b/test/org/mockitousage/stubbing/DeepStubbingTest.java
index be8bcaa33b..77fbdd28c3 100644
--- a/test/org/mockitousage/stubbing/DeepStubbingTest.java
+++ b/test/org/mockitousage/stubbing/DeepStubbingTest.java
@@ -22,7 +22,7 @@
 import java.net.Socket;
 import java.util.Locale;
 import javax.net.SocketFactory;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.mockito.InOrder;
 import org.mockito.exceptions.verification.TooManyActualInvocations;
diff --git a/test/org/mockitousage/stubbing/StubbingWithAdditionalAnswers.java b/test/org/mockitousage/stubbing/StubbingWithAdditionalAnswers.java
index 3f428ad24a..0ba0430e3c 100644
--- a/test/org/mockitousage/stubbing/StubbingWithAdditionalAnswers.java
+++ b/test/org/mockitousage/stubbing/StubbingWithAdditionalAnswers.java
@@ -10,7 +10,7 @@
 import org.mockito.runners.MockitoJUnitRunner;
 import org.mockitousage.IMethods;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.AdditionalAnswers.returnsArgAt;
 import static org.mockito.AdditionalAnswers.returnsFirstArg;
 import static org.mockito.AdditionalAnswers.returnsLastArg;
diff --git a/test/org/mockitousage/stubbing/StubbingWithDelegateTest.java b/test/org/mockitousage/stubbing/StubbingWithDelegateTest.java
index bc4494a473..e8fc92ab43 100644
--- a/test/org/mockitousage/stubbing/StubbingWithDelegateTest.java
+++ b/test/org/mockitousage/stubbing/StubbingWithDelegateTest.java
@@ -4,7 +4,7 @@
  */
 package org.mockitousage.stubbing;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockito.AdditionalAnswers.delegatesTo;
 import static org.mockito.Mockito.doReturn;
diff --git a/test/org/mockitoutil/ClassLoadersTest.java b/test/org/mockitoutil/ClassLoadersTest.java
index 1f6b0900bd..557ecfe446 100644
--- a/test/org/mockitoutil/ClassLoadersTest.java
+++ b/test/org/mockitoutil/ClassLoadersTest.java
@@ -3,7 +3,7 @@
 import org.junit.Test;
 import org.mockito.Mockito;
 
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
 import static org.mockitoutil.ClassLoaders.currentClassLoader;
 import static org.mockitoutil.ClassLoaders.excludingClassLoader;