public List<FolderItemOperation> getRestrictedOperations(final Path path) { final List<FolderItemOperation> restrictedOperations = new ArrayList<FolderItemOperation>(); if (copyService.hasRestriction(path)) { restrictedOperations.add(FolderItemOperation.COPY); } if (renameService.hasRestriction(path)) { restrictedOperations.add(FolderItemOperation.RENAME); } if (deleteService.hasRestriction(path)) { restrictedOperations.add(FolderItemOperation.DELETE); } return restrictedOperations; } }
private void mockDeleteRestrictions(boolean hasRestrictions) { when(deleteService.hasRestriction(any(Path.class))).thenReturn(hasRestrictions); }