@Override
    public Path mkdir(final Path folder, final TransferStatus status) throws BackgroundException {
        try {
            session.getClient().createDirectory(new DAVPathEncoder().encode(folder));
        }
        catch(SardineException e) {
            throw new DAVExceptionMappingService().map("Cannot create folder {0}", e, folder);
        }
        catch(IOException e) {
            throw new HttpExceptionMappingService().map(e, folder);
        }
        return folder;
    }
@Test
    public void testMakeDirectory() throws Exception {
        final Path test = new Path(new DefaultHomeFinderService(session).find(), new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
        new DAVDirectoryFeature(session).mkdir(test, new TransferStatus());
        assertTrue(session.getFeature(Find.class).find(test));
        assertThrows(ConflictException.class, () -> new DAVDirectoryFeature(session).mkdir(test, new TransferStatus()));
        new DAVDeleteFeature(session).delete(Collections.<Path>singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
        assertFalse(session.getFeature(Find.class).find(test));
    }