@Override
    public void delete(final Map<Path, TransferStatus> files, final PasswordCallback prompt, final Callback callback) throws BackgroundException {
        for(Path f : files.keySet()) {
            try {
                if(f.isDirectory()) {
                    new FoldersApi(new BoxApiClient(session.getClient())).deleteFoldersId(fileid.getFileId(f), null, true);
                }
                else {
                    new FilesApi(new BoxApiClient(session.getClient())).deleteFilesId(fileid.getFileId(f), null);
                }
            }
            catch(ApiException e) {
                throw new BoxExceptionMappingService(fileid).map("Cannot delete {0}", e, f);
            }
        }
    }
@Test
    public void testDeleteMultipleFiles() throws Exception {
        final BoxFileidProvider fileid = new BoxFileidProvider(session);
        final Path folder = new BoxDirectoryFeature(session, fileid).mkdir(new Path(new AlphanumericRandomStringService().random(), EnumSet.of(AbstractPath.Type.directory)), new TransferStatus());
        final Path file1 = new BoxTouchFeature(session, fileid).touch(new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
        final Path file2 = new BoxTouchFeature(session, fileid).touch(new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
        assertTrue(new BoxFindFeature(session, fileid).find(file1));
        assertTrue(new BoxFindFeature(session, fileid).find(file2));
        new BoxDeleteFeature(session, fileid).delete(Arrays.asList(file1, file2), new DisabledLoginCallback(), new Delete.DisabledCallback());
        assertFalse((new BoxFindFeature(session, fileid).find(file1, new DisabledListProgressListener())));
        assertFalse((new BoxFindFeature(session, fileid).find(file2, new DisabledListProgressListener())));
        assertTrue(new BoxFindFeature(session, fileid).find(folder, new DisabledListProgressListener()));
        new BoxDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
        assertFalse((new BoxFindFeature(session, fileid).find(folder, new DisabledListProgressListener())));
    }