@Override
    public Path mkdir(final Path folder, final TransferStatus status) throws BackgroundException {
        try {
            if(new DeepboxFindFeature(session, fileid).find(folder)) {
                throw new ConflictException(folder.getAbsolute());
            }
            final Folder upload = new Folder();
            upload.setName(folder.getName());
            upload.setI18n(Collections.emptyMap());
            final List<Folder> body = Collections.singletonList(upload);
            final String deepBoxNodeId = fileid.getDeepBoxNodeId(folder.getParent());
            final String boxNodeId = fileid.getBoxNodeId(folder.getParent());
            final List<FolderAdded> created;
            if(new DeepboxPathContainerService(session).isDocuments(folder.getParent())) {
                created = new PathRestControllerApi(session.getClient()).addFolders1(
                        body,
                        deepBoxNodeId,
                        boxNodeId
                );
            }
            else {
                final String parentNodeId = fileid.getFileId(folder.getParent());
                created = new PathRestControllerApi(session.getClient()).addFolders(
                        body,
                        deepBoxNodeId,
                        boxNodeId,
                        parentNodeId
                );
            }
            final FolderAdded f = created.stream().findFirst().orElse(null);
            if(f != null) {
                fileid.cache(folder, f.getNode().getNodeId());
            }
            return folder.withAttributes(new DeepboxAttributesFinderFeature(session, fileid).toAttributes(f.getNode()));
        }
        catch(ApiException e) {
            throw new DeepboxExceptionMappingService(fileid).map("Cannot create folder {0}", e, folder);
        }
    }
@Test
    public void testBookkeeping() throws Exception {
        final DeepboxIdProvider nodeid = new DeepboxIdProvider(session);
        final DeepboxDirectoryFeature directory = new DeepboxDirectoryFeature(session, nodeid);
        final Path parent = new Path("/ORG 4 - DeepBox Desktop App/ORG3:Box1/Documents/Bookkeeping", EnumSet.of(Path.Type.directory));
        final Path folder = new Path(parent, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
        directory.mkdir(folder, new TransferStatus());
        assertEquals(0, new DeepboxListService(session, nodeid).list(folder, new DisabledListProgressListener()).size());
        new DeepboxDeleteFeature(session, nodeid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
        assertFalse(new DeepboxFindFeature(session, nodeid).find(folder));
    }