@Override
    public Path mkdir(final Path folder, final TransferStatus status) throws BackgroundException {
        try {
            if(!session.getClient().makeDirectory(folder.getAbsolute())) {
                throw new FTPException(session.getClient().getReplyCode(), session.getClient().getReplyString());
            }
            return folder;
        }
        catch(FTPException e) {
            switch(e.getCode()) {
                case FTPReply.FILE_UNAVAILABLE:
                    throw new ConflictException(folder.getAbsolute());
            }
            throw new FTPExceptionMappingService().map("Cannot create folder {0}", e, folder);
        }
        catch(IOException e) {
            throw new FTPExceptionMappingService().map("Cannot create folder {0}", e, folder);
        }
    }
@Test
    public void testMakeDirectory() throws Exception {
        final Path test = new Path(new FTPWorkdirService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.directory));
        new FTPDirectoryFeature(session).mkdir(test, new TransferStatus());
        assertTrue(session.getFeature(Find.class).find(test));
        assertThrows(ConflictException.class, () -> new FTPDirectoryFeature(session).mkdir(test, new TransferStatus()));
        new FTPDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
        assertFalse(session.getFeature(Find.class).find(test));
    }