1
0
mirror of synced 2026-08-05 09:47:05 +00:00

Update to Mockito 2.10.0

Issue: gh-4608
This commit is contained in:
Rob Winch
2017-10-09 13:19:21 -05:00
parent 74aa8bc803
commit 445834784a
40 changed files with 78 additions and 114 deletions
@@ -40,9 +40,9 @@ public class AclEntryAfterInvocationCollectionFilteringProviderTests {
public void objectsAreRemovedIfPermissionDenied() throws Exception {
AclService service = mock(AclService.class);
Acl acl = mock(Acl.class);
when(acl.isGranted(any(List.class), any(List.class), anyBoolean())).thenReturn(
when(acl.isGranted(any(), any(), anyBoolean())).thenReturn(
false);
when(service.readAclById(any(ObjectIdentity.class), any(List.class))).thenReturn(
when(service.readAclById(any(), any())).thenReturn(
acl);
AclEntryAfterInvocationCollectionFilteringProvider provider = new AclEntryAfterInvocationCollectionFilteringProvider(
service, Arrays.asList(mock(Permission.class)));
@@ -54,7 +54,7 @@ public class AclEntryAfterInvocationProviderTests {
Acl acl = mock(Acl.class);
when(acl.isGranted(any(List.class), any(List.class), anyBoolean())).thenReturn(
true);
when(service.readAclById(any(ObjectIdentity.class), any(List.class))).thenReturn(
when(service.readAclById(any(), any())).thenReturn(
acl);
AclEntryAfterInvocationProvider provider = new AclEntryAfterInvocationProvider(
service, Arrays.asList(mock(Permission.class)));
@@ -106,9 +106,9 @@ public class AclEntryAfterInvocationProviderTests {
when(acl.isGranted(any(List.class), any(List.class), anyBoolean())).thenReturn(
false);
// Try a second time with no permissions found
when(acl.isGranted(any(List.class), any(List.class), anyBoolean())).thenThrow(
when(acl.isGranted(any(), any(List.class), anyBoolean())).thenThrow(
new NotFoundException(""));
when(service.readAclById(any(ObjectIdentity.class), any(List.class))).thenReturn(
when(service.readAclById(any(), any())).thenReturn(
acl);
AclEntryAfterInvocationProvider provider = new AclEntryAfterInvocationProvider(
service, Arrays.asList(mock(Permission.class)));