@Override
    public Path mkdir(final Path folder, final TransferStatus status) throws BackgroundException {
        try {
            final ResourceCreationRepresentationArrayInner resourceCreationRepresentation = new ResourceCreationRepresentationArrayInner();
            final String path = StringUtils.removeStart(folder.getAbsolute(), String.valueOf(Path.DELIMITER));
            resourceCreationRepresentation.setPath(path);
            resourceCreationRepresentation.setResourceType(ResourceCreationRepresentationArrayInner.ResourceTypeEnum.CONTAINER);
            final EueApiClient client = new EueApiClient(session);
            final ResourceCreationResponseEntries resourceCreationResponseEntries = new PostChildrenForAliasApi(client).resourceAliasAliasChildrenPost(
                    EueResourceIdProvider.ROOT, Collections.singletonList(resourceCreationRepresentation), null, null, null, null, null);
            if(!resourceCreationResponseEntries.containsKey(path)) {
                throw new NotfoundException(folder.getAbsolute());
            }
            final ResourceCreationResponseEntry resourceCreationResponseEntry = resourceCreationResponseEntries.get(path);
            switch(resourceCreationResponseEntry.getStatusCode()) {
                case HttpStatus.SC_OK:
                    // Already exists
                    throw new ConflictException(folder.getAbsolute());
                case HttpStatus.SC_CREATED:
                    final String resourceId = EueResourceIdProvider.getResourceIdFromResourceUri(resourceCreationResponseEntry.getHeaders().getLocation());
                    fileid.cache(folder, resourceId);
                    return folder;
                default:
                    log.warn(String.format("Failure %s creating folder %s", resourceCreationResponseEntry, folder));
                    final ResourceCreationResponseEntryEntity entity = resourceCreationResponseEntry.getEntity();
                    if(null == entity) {
                        throw new EueExceptionMappingService().map(new ApiException(resourceCreationResponseEntry.getReason(),
                                null, resourceCreationResponseEntry.getStatusCode(), client.getResponseHeaders()));
                    }
                    throw new EueExceptionMappingService().map(new ApiException(resourceCreationResponseEntry.getEntity().getError(),
                            null, resourceCreationResponseEntry.getStatusCode(), client.getResponseHeaders()));
            }
        }
        catch(ApiException e) {
            throw new EueExceptionMappingService().map("Cannot create folder {0}", e, folder);
        }
    }
@Test(expected = ConflictException.class)
    public void testCaseSensitivity() throws Exception {
        final EueResourceIdProvider fileid = new EueResourceIdProvider(session);
        final String filename = new AlphanumericRandomStringService().random();
        new EueDirectoryFeature(session, fileid).mkdir(new Path(StringUtils.capitalize(filename), EnumSet.of(Path.Type.directory)), new TransferStatus());
        try {
            new EueDirectoryFeature(session, fileid).mkdir(new Path(StringUtils.lowerCase(filename), EnumSet.of(Path.Type.directory)), new TransferStatus());
            fail();
        }
        finally {
            new EueDeleteFeature(session, fileid).delete(Collections.singletonList(new Path(StringUtils.capitalize(filename), EnumSet.of(Path.Type.directory))), new DisabledLoginCallback(), new Delete.DisabledCallback());
        }
    }