diff --git a/src/test/java/org/springframework/data/ldap/repository/SimpleLdapRepositoryTests.java b/src/test/java/org/springframework/data/ldap/repository/SimpleLdapRepositoryTests.java index 4e5e7c1..4a2d41d 100644 --- a/src/test/java/org/springframework/data/ldap/repository/SimpleLdapRepositoryTests.java +++ b/src/test/java/org/springframework/data/ldap/repository/SimpleLdapRepositoryTests.java @@ -16,7 +16,7 @@ package org.springframework.data.ldap.repository; import static org.assertj.core.api.Assertions.*; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.*; import java.util.Arrays; @@ -31,7 +31,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.springframework.data.domain.Persistable; import org.springframework.data.ldap.repository.support.SimpleLdapRepository; import org.springframework.ldap.NameNotFoundException; @@ -83,7 +83,6 @@ public class SimpleLdapRepositoryTests { Object expectedEntity = new Object(); when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName()); - when(odmMock.getCalculatedId(expectedEntity)).thenReturn(null); tested.save(expectedEntity); @@ -97,7 +96,6 @@ public class SimpleLdapRepositoryTests { LdapName expectedName = LdapUtils.newLdapName("ou=newlocation"); when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName()); - when(odmMock.getCalculatedId(expectedEntity)).thenReturn(expectedName); tested.save(expectedEntity); @@ -111,7 +109,6 @@ public class SimpleLdapRepositoryTests { LdapName expectedName = LdapUtils.emptyLdapName(); when(odmMock.getId(expectedEntity)).thenReturn(null); - when(odmMock.getCalculatedId(expectedEntity)).thenReturn(expectedName); tested.save(expectedEntity); @@ -125,7 +122,6 @@ public class SimpleLdapRepositoryTests { when(expectedEntity.isNew()).thenReturn(true); when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName()); - when(odmMock.getCalculatedId(expectedEntity)).thenReturn(null); tested.save(expectedEntity); @@ -140,7 +136,6 @@ public class SimpleLdapRepositoryTests { when(expectedEntity.isNew()).thenReturn(true); when(odmMock.getId(expectedEntity)).thenReturn(null); - when(odmMock.getCalculatedId(expectedEntity)).thenReturn(expectedName); tested.save(expectedEntity); @@ -154,7 +149,6 @@ public class SimpleLdapRepositoryTests { when(expectedEntity.isNew()).thenReturn(false); when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName()); - when(odmMock.getCalculatedId(expectedEntity)).thenReturn(null); tested.save(expectedEntity);