FileAccessService { public boolean isUserHasAtLeastGivenPermission(String userId, File file, Permission... permissions) { Map<String, Permission> sharedUsersIdWithPermission = file.getSharedUsersIdWithPermission(); if (sharedUsersIdWithPermission.containsKey(userId)) { Permission userPermission = sharedUsersIdWithPermission.get(userId); return Arrays.asList(permissions).contains(userPermission); } return false; }  boolean isUserHasNotAccess(String userId, File file); boolean isUserCanNotDelete(String userId, File file); boolean isUserCanNotShare(String userId, File file); boolean isUserHasAccess(String userId, File file); boolean isUserCanDelete(String userId, File file); boolean isUserCanShare(String userId, File file); boolean isOwner(String userId, File file); boolean isUserHasAtLeastGivenPermission(String userId, File file, Permission... permissions);  }
@Test public void testIsUserHasAtLeastGivenPermission() throws Exception { }