class FileAccessService {

    public boolean isUserCanDelete(String userId, File file) {
        if (isOwner(userId, file)) return true;
        if (isUserHasAtLeastGivenPermission(userId, file, Permission.GET_AND_DELETE)) return true;
        return false;
    }

}

class FileAccessServiceTest {

    private FileAccessService fileAccessService;

    @Test
    public void testIsUserCanDelete() throws Exception {


    }

}

class FileAccessServiceTest {

    private FileAccessService fileAccessService;

    @Test
    public void testIsUserCanDelete() throws Exception {

    }

}