Matchers is now deprecated in Mockito 2, it's now replaced by ArgumentMatchers (#2342)

This commit is contained in:
Jose Carvajal 2017-07-31 16:08:01 +02:00 committed by KevinGilmore
parent 4b53c00bca
commit b4f7806ce6
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentMatcher;
import org.mockito.ArgumentMatchers;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
@ -120,7 +121,7 @@ public class LoginControllerIntegrationTest {
.login(userForm);
// complex matcher
Mockito.verify(loginService)
.setCurrentUser(Mockito.argThat(new ArgumentMatcher<String>() {
.setCurrentUser(ArgumentMatchers.argThat(new ArgumentMatcher<String>() {
@Override
public boolean matches(String argument) {
return argument.startsWith("foo");